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.
abstract public class SystemException extends java.lang.RuntimeExceptionCORBA system exceptions are raised when the runtime encounters problems. They inherit from j
ava.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
Parameter | Description |
---|---|
minor | The minor code to be set. |
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.
Last Updated: 02/04/98 14:20:35
Any sample code included above is provided for your use on an "AS IS" basis, under the Netscape License Agreement - Terms of Use