[omniORB] Use of CORBA::Environment and installing exception handler

Satya B bsatya72 at yahoo.com
Wed Aug 11 18:36:14 BST 2004


I have code that uses the Servant Locator - and it is necessary to catch unhandled exceptions in the application logic and output a log message to a file.
 
the post_method() in servant activator design provided an Environment object and hence code like 
if(env->exception()) { write log message to file};
worked. I am trying to achieve the same in postinvoke (servant locator) but have no idea on how to do it. 
 
Here is what I have attempted - without success --
1. Declare a CORBA::Environment object
2. install Exception handlers - using omniORB::installSystemExceptionHandler and write to the Environment object using env->exception(exception)
3. In postinvoke() query the environment object -- if(env->exception())... write to log.
 
4. In my application code I generate an exception using int divide by zero.
 
However, the logging code in postinvoke never gets called - nor the exception handler.
 
Can someone advise on the above?
 
Thanks,
bsat.

		
---------------------------------
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20040811/1a0619dd/attachment.htm


More information about the omniORB-list mailing list