The CORBA specification defines the list of standard system exceptions. In C++, all CORBA system exceptions are mapped to a C++ class that is derived from the standard SystemException class defined in the CORBA module. You may want to trap the exceptions shown in this code fragment:
try
{
... // invoke methods
}
catch (CORBA::COMM_FAILURE& cf)
{
... // A component aborted the EAServer transaction,
// or the transaction timed out. Retry the
// transaction if desired.
}
catch (CORBA::TRANSACTION_ROLLEDBACK& tr)
{
... // possibly retry the transaction
}
catch (CORBA::OBJECT_NOT_EXIST& one)
{
... // Received when trying to instantiate
// a component that does not exist. Also
// received when invoking a method if the
// object reference has expired
// (this can happen if the component
// is stateful and is configured with
// a finite Instance Timeout property).
// Create a new proxy instance if desired.}
}
catch (CORBA::NO_PERMISSSION& np)
{
... // tell the user they are not authorized
}
catch (CORBA::SystemException& se)
{
... // report the error but don’t bother retrying
}
Not all of the possible system exceptions are shown
in the example. See the CORBA/IIOP 2.2 Specification (formal/98-02-01)
for a list of all the possible exceptions.
| Copyright © 2005. Sybase Inc. All rights reserved. |
|
|