Netscape Internet Service Broker for Java: Reference Guide, Version 1.0

[Previous] [Contents]

Chapter 7
Exceptions Classes

This chapter describes the exception classes used in ISB for Java. It includes the following major sections:

Introduction

CORBA system exceptions have been made a subclass of java.lang.RuntimeException. This means that CORBA system exceptions do not need to be declared in all method signatures which might raise such exceptions.

The UserException is a subclass of java.lang.Exception. Due to the inheritance hierarchy, the class org.omg.CORBA.Exception no longer exists.

SystemException

abstract public class SystemException extends java.lang.RuntimeException
CORBA system exceptions are raised when the runtime encounters problems. They inherit from java.lang.RuntimeException. A table below summarizes all the SystemException classes that can be raised and their associated meanings.

The standard IDL system exceptions are mapped to final Java classes that extend org.omg.CORBA.SystemException and provide access to the IDL major and minor exception code, as well as a string describing the reason for the exception.

There are no public constructors for org.omg.CORBA.SystemException; only classes that extend it can be instantiated.

Currently, ISB for Java does not support the use of minor codes; consequently, there is no minor method.

Attributes

public CompletionStatus completed
This attribute indicates whether the operation was completed or not.

Methods

This method sets the minor code. The minor code is not used currently.

Parameter Description
minor

The minor code to be set.

Exception Class Names

Exception Class Name Description
BAD_CONTEXT

Error processing context object.

BAD_INV_ORDER

Routine invocations out of order.

BAD_OPERATION

Invalid operation.

BAD_PARAM

An invalid parameter was passed.

BAD_TYPECODE

Invalid typecode.

COMM_FAILURE

Communication failure.

DATA_CONVERSION

Data conversion error.

FREE_MEM

Unable to free memory.

IMP_LIMIT

Implementation limit violated.

INITIALIZE

ORB initialization failure.

INTERNAL

ORB internal error.

INTF_REPOS

Error accessing interface repository.

INV_FLAG

Invalid flag was specified.

INV_INDENT

Invalid identifier syntax.

INV_OBJREF

Invalid object reference specified.

MARSHAL

Error marshalling parameter or result.

NO_IMPLEMENT

Operation implementation not available.

NO_MEMORY

Dynamic memory allocation failure.

NO_PERMISSION

No permission for attempted operation.

NO_RESOURCES

Insufficient resources to process request.

NO_RESPONSE

Response to request not yet available.

OBJ_ADAPTER

Failure detected by object adaptor.

OBJECT_NOT_EXIST

Object is not available.

PERSIST_STORE

Persistent storage failure.

TRANSIENT

Transient failure.

UNKNOWN

Unknown exception.

UserException

public class UserException extends java.lang.Exception
The UserException class is an abstract base class used to define exceptions that an object implementation may raise. There is no state information associated with these exception types, but derived classes may add their own state information. The primary use of this class is to simplify the use of catch blocks in a client's code, as shown in the following code example.

try {
  proxy.operation();
}
catch(org.omg.CORBA.SystemException se) {
  System.out.println("The runtime failed: " + se);
}
catch(org.omg.CORBA.UserException ue) {
  System.out.println("The implementation failed: " + ue);
}

Constructor

protected UserException()
This method creates a UserException exception.


[Previous] [Contents]

Last Updated: 02/04/98 14:20:35


Copyright © 1997 Netscape Communications Corporation

Any sample code included above is provided for your use on an "AS IS" basis, under the Netscape License Agreement - Terms of Use