[omniORB] Exception handlers

Duncan Grisby dgrisby@uk.research.att.com
Mon, 11 Feb 2002 14:05:53 +0000


On Wednesday 30 January, Andrey Koubychev wrote:

>       In omniOrb manual written that i dont need to wrap corba calls
>       into try/catch blocks , I can setup handlers for exceptions.
>       There are exists 3 types of handlers for following exceptions :
>       Transient, CommFailure and SystemException, but in samples
>       exists also fatalException and Exception types. So, question ,
>       How can i set hooks for those 2 exceptions too ?

There are no handlers for those exceptions. Exception is the base
class of SystemException and UserException. You should always catch
user exceptions specifically. fatalException is an omniORB internal
exception used for assertion failures. If you really care about
robustness, you can catch fatalException at the top-level main()
function and try to do something sensible, but if fatalException
occurs it means something has gone terribly wrong inside the ORB, and
about the only sensible thing you can do is report the error and quit.

Cheers,

Duncan.

-- 
 -- Duncan Grisby  \  Research Engineer  --
  -- AT&T Laboratories Cambridge          --
   -- http://www.uk.research.att.com/~dpg1 --