Previous | Table of Contents | Next |
The Messaging::ExceptionHolder valuetype encapsulates the exception data and enough information to turn that data back into
a raised exception.
// IDL
module Messaging { // ... all the other stuff native UserExceptionBase; valuetype ExceptionHolder {
void raise_exception() raises (UserExceptionBase); void raise_exception_with_list(
in CORBA::ExceptionList exc_list ) raises (UserExceptionBase); private boolean is_system_exception; private boolean byte_order;
private sequence<octet> marshaled_exception;
};};
• raise_exception() - This method is used by applications to raise exception from the encapsulated marshaled_exception member.
• UserExceptionBase - Language mapping of this native type should allow any user exception to be raised from this method. For instance, it is mapped to CORBA::UserException in C++ and to org.omg.CORBA.UserException in java. As usual, system exceptions do not need to be in the raises clause for raising them from this method.
• raise_exception_with_list() - If is_system_exception is true, this function is same as raise_exception(). Otherwise, this method raises an exception from the marshaled_exception using an application provided user exception list. It is useful and should only be used when the given exception holder is not from a
skeleton reply handler's xxx_excep() method. For instance, it is from a DSI reply handler servant or from another ORB runtime. In these cases, the exception holder may not have an internal user exception list available.