<DIV>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.</DIV>
<DIV> </DIV>
<DIV>the post_method() in servant activator design provided an Environment object and hence code like </DIV>
<DIV>if(env->exception()) { write log message to file};</DIV>
<DIV>worked. I am trying to achieve the same in postinvoke (servant locator) but have no idea on how to do it. </DIV>
<DIV> </DIV>
<DIV>Here is what I have attempted - without success --</DIV>
<DIV>1. Declare a CORBA::Environment object</DIV>
<DIV>2. install Exception handlers - using omniORB::installSystemExceptionHandler and write to the Environment object using env->exception(exception)</DIV>
<DIV>3. In postinvoke() query the environment object -- if(env->exception())... write to log.</DIV>
<DIV> </DIV>
<DIV>4. In my application code I generate an exception using int divide by zero.</DIV>
<DIV> </DIV>
<DIV>However, the logging code in postinvoke never gets called - nor the exception handler.</DIV>
<DIV> </DIV>
<DIV>Can someone advise on the above?</DIV>
<DIV> </DIV>
<DIV>Thanks,</DIV>
<DIV>bsat.</DIV><p>
                <hr size=1>Do you Yahoo!?<br>
<a href="http://us.rd.yahoo.com/mail_us/taglines/50x/*http://promotions.yahoo.com/new_mail/static/efficiency.html">Yahoo! Mail</a> - 50x more storage than other providers!