<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>RE: [omniORB] propagating exceptions</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>This is how I was catching it at the highest level. But the exception never reaches here. As specified in the code snippet I sent, you can see that it exited from the stub code. </FONT></P>

<P><FONT SIZE=2>try :</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp; # call some functions</FONT>
<BR><FONT SIZE=2>except CORBA.INV_OBJREF:</FONT>
</P>

<P><FONT SIZE=2>- Srikanth</FONT>
</P>

<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: W. Borgert [<A HREF="mailto:debacle@debian.org">mailto:debacle@debian.org</A>]</FONT>
<BR><FONT SIZE=2>Sent: Tuesday, March 16, 2004 12:20 PM</FONT>
<BR><FONT SIZE=2>To: Srikanth Mandava</FONT>
<BR><FONT SIZE=2>Cc: 'omniorb-list@omniorb-support.com'</FONT>
<BR><FONT SIZE=2>Subject: RE: [omniORB] propagating exceptions</FONT>
</P>
<BR>

<P><FONT SIZE=2>Quoting Srikanth Mandava &lt;Srikanth.Mandava@cosinecom.com&gt;:</FONT>
<BR><FONT SIZE=2>&gt; The application code is in commandexecutor.py which has the following</FONT>
<BR><FONT SIZE=2>&gt; function. The exec is doing the CORBA execution. But the exception never</FONT>
</P>

<P><FONT SIZE=2>You may catch the exception explicitly:</FONT>
</P>

<P><FONT SIZE=2>&nbsp;&nbsp;&nbsp; except CORBA.OBJECT_NOT_EXIST:</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...</FONT>
</P>

<P><FONT SIZE=2>&nbsp;&nbsp;&nbsp; except CORBA.CORBA.INV_OBJREF:</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ....</FONT>
</P>

<P><FONT SIZE=2>If nothing helps, do a &quot;catch all&quot; at the end of your block:</FONT>
</P>

<P><FONT SIZE=2>&nbsp;&nbsp;&nbsp; except:</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...</FONT>
</P>

<P><FONT SIZE=2>Cheers,</FONT>
<BR><FONT SIZE=2>-- </FONT>
<BR><FONT SIZE=2>W. Borgert - <A HREF="http://people.debian.org/~debacle/" TARGET="_blank">http://people.debian.org/~debacle/</A></FONT>
</P>

</BODY>
</HTML>