<!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>Here is one example. </FONT>
</P>
<P><FONT SIZE=2>The application code is in commandexecutor.py which has the following function. The exec is doing the CORBA execution. But the exception never gets here. It exits in the CORBA omni orb stub itself.</FONT></P>
<P><FONT SIZE=2>def executeShowConfigCommand(commandString, localStore) :</FONT>
</P>
<P><FONT SIZE=2> result = None</FONT>
<BR><FONT SIZE=2> commandResult = constants.FAILURE</FONT>
</P>
<P><FONT SIZE=2> try :</FONT>
<BR><FONT SIZE=2> #print commandString</FONT>
<BR><FONT SIZE=2> exec(commandString, helpers.__dict__, localStore)</FONT>
<BR><FONT SIZE=2> commandResult = constants.SUCCESS</FONT>
</P>
<P><FONT SIZE=2> except (AgentIllegalArgumentException), e :</FONT>
<BR><FONT SIZE=2> handleAgentException(e)</FONT>
</P>
<P><FONT SIZE=2> except (AgentObjectNotFoundException), e :</FONT>
<BR><FONT SIZE=2> #print '\n Object does not exist'</FONT>
<BR><FONT SIZE=2> pass</FONT>
</P>
<P><FONT SIZE=2> except (Exception), e :</FONT>
<BR><FONT SIZE=2> handleClientException('CLI-0003', None)</FONT>
<BR><FONT SIZE=2> helpers.printExceptionTrace()</FONT>
</P>
<P><FONT SIZE=2> if localStore.has_key('result') :</FONT>
<BR><FONT SIZE=2> result = localStore['result']</FONT>
</P>
<P><FONT SIZE=2> return commandResult, result</FONT>
</P>
<BR>
<BR>
<BR>
<BR>
<P><FONT SIZE=2>03/12/04 22:52:39 : Traceback (most recent call last): </FONT>
<BR><FONT SIZE=2> File "./commandexecutor.py", line 117, in executeShowConfigCommand </FONT>
<BR><FONT SIZE=2> exec(commandString, helpers.__dict__, localStore) </FONT>
<BR><FONT SIZE=2> File "<string>", line 1, in ? </FONT>
<BR><FONT SIZE=2> File "/opt/ipnos/cli/generated/omniidl/systemservice_idl.py", line 1354, in showBootConfigConfig </FONT>
<BR><FONT SIZE=2> return _omnipy.invoke(self, "showBootConfigConfig", _0_cosinecom.agent.SystemService._d_showBootConfigConfig, args) </FONT></P>
<P><FONT SIZE=2>INV_OBJREF: Minor: 0x0, COMPLETED_NO </FONT>
</P>
<BR>
<BR>
<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 10:50 AM</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 <Srikanth.Mandava@cosinecom.com>:</FONT>
<BR><FONT SIZE=2>> I'm using omniORB python to generate stubs to talk to a CORBA server. When a</FONT>
<BR><FONT SIZE=2>> COMM_FAILURE or other system exceptions are thrown from the CORBA server,</FONT>
<BR><FONT SIZE=2>> these are not being propagated to the application. The client is quitting</FONT>
<BR><FONT SIZE=2>> after the stubs handle the exception instead of propagating them to the</FONT>
<BR><FONT SIZE=2>> application code. Is there a way to get the system exceptions propagated to</FONT>
<BR><FONT SIZE=2>> the application code?</FONT>
</P>
<P><FONT SIZE=2>Are you sure? We have a lot of omniORBpy clients are they manage to</FONT>
<BR><FONT SIZE=2>handle CORBA exceptions without any problems. Both CORBA system</FONT>
<BR><FONT SIZE=2>exceptions and CORBA user exceptions work fine. Could you post a</FONT>
<BR><FONT SIZE=2>code snippet, please?</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>