[omniORB] Exception Hierarchy
jorgefm@cirsa.com
jorgefm@cirsa.com
Wed Nov 13 15:32:00 2002
Hi all !
Is there any root exception from which all the rest are derived ?
Now i have:
try {
<some code to call a CORBA object method>
} catch(CORBA::COMM_FAILURE& e) {
<comm failures code>
} catch(CORBA::SystemException& e) {
<system exception exception code>
} catch(CORBA::Exception& e) {
<exception code>
} catch(omniORB::fatalException& e) {
<omniORB fatal exception code>
} catch(...) {
<the rest of exceptions>
}
I would like to centralize all the CORBA exceptions in a single point,
because I have the previous code in a lot of places (for every IDL
method i have defined!) and i don't want to check all this places every
time i change the code to handle the exception. I want something like:
try {
<some code to call a CORBA object method>
} catch( <root CORBA exception class>& e) {
HandleCORBAException( e );
} catch(...) {
<the rest of exceptions>
}
Is it possible ? Any comment is welcome !
I know that there is three handler that you can install (Transient,
Comm failure and system) but that's enough to handle all the exceptions
that omniORB could generate?
Thanks a lot,
Jorge