<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>propagating exceptions</TITLE>
<META content="MSHTML 5.50.4207.2601" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=209460319-16032004><FONT face=Arial color=#0000ff size=2>I'm
not doing a rethrow in this case. The exception does not come to my application
code at all. It's exiting the client from the stub layer after handling the
system exception.</FONT></SPAN></DIV>
<DIV><SPAN class=209460319-16032004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=209460319-16032004><FONT face=Arial color=#0000ff size=2>-
Srikanth</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Michael Shearer
[mailto:mshearer@aastra.com]<BR><B>Sent:</B> Tuesday, March 16, 2004 10:56
AM<BR><B>To:</B> Srikanth Mandava;
omniorb-list@omniorb-support.com<BR><B>Subject:</B> RE: [omniORB] propagating
exceptions<BR><BR></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=358014918-16032004>I'm
not too familiar with Python but I assume you're attempting to rethrow the
exception to the application once you've handled it in the server, is that
correct? For example:</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=358014918-16032004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=358014918-16032004>try{</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=358014918-16032004> //whatever</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=358014918-16032004></SPAN></FONT><FONT face=Arial color=#0000ff
size=2><SPAN class=358014918-16032004>}</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=358014918-16032004>catch(Exception)</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=358014918-16032004>{</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=358014918-16032004> //handler</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=358014918-16032004> throw;</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=358014918-16032004>}</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=358014918-16032004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=358014918-16032004>I
was having similar problems in C++ a while back because of a bug with the
GNU compiler. Propagating exceptions doesn't work when you compile
you're code using a rethrow and when using the "-fomit_frame_pointer"
flag. If you're using g++, that might be the
problem.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=358014918-16032004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=358014918-16032004>Mike</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=358014918-16032004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=358014918-16032004>
<P><B><FONT face="Bookman Old Style" color=#0000ff>Michael Shearer</FONT></B>
<BR><B><FONT face=Garamond size=1>CVX SS7 Gateway (CSG) Engineer</FONT></B>
<BR><B><FONT face=Garamond size=1>Aastra Telecom US, CVX Division</FONT></B>
<BR><B><FONT face=Garamond size=1>8 Federal Street</FONT></B> <BR><B><FONT
face=Garamond size=1>Billerica, MA, USA, 01821-3570</FONT><BR></B><FONT
face=Wingdings color=#0000ff size=1>(</FONT><FONT face=Arial color=#000000
size=1></FONT> <FONT face=Arial color=#808080 size=1>Phone (978)
436-4248</FONT> <BR><FONT face=Wingdings color=#0000ff size=1>(</FONT><FONT
face=Arial color=#000000 size=1></FONT> <FONT face=Arial color=#808080
size=1>Fax (978) 436-4233</FONT><BR><FONT face=Wingdings color=#0000ff
size=1>,</FONT><FONT face=Arial color=#000000 size=1></FONT> <FONT face=Arial
color=#808080 size=1>Internet Mail</FONT><U> <FONT face=Arial color=#0000ff
size=1>mshearer@aastra.com</FONT></U><BR><FONT face=Wingdings color=#0000ff
size=1>:</FONT><FONT face=Arial color=#000000 size=1></FONT> <FONT face=Arial
color=#808080 size=1>Web</FONT><FONT face=Arial color=#0000ff
size=1></FONT><U> <FONT face=Arial color=#0000ff
size=1>www.aastra.com</FONT></U> </P></SPAN></FONT></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B>
omniorb-list-bounces@omniorb-support.com
[mailto:omniorb-list-bounces@omniorb-support.com]<B>On Behalf Of
</B>Srikanth Mandava<BR><B>Sent:</B> Tuesday, March 16, 2004 1:43
PM<BR><B>To:</B> 'omniorb-list@omniorb-support.com'<BR><B>Subject:</B>
[omniORB] propagating exceptions<BR><BR></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=037494318-16032004><FONT
color=#0000ff>
</FONT></SPAN>Hi,</FONT></FONT> </DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<P><FONT face=Arial size=2>I'm using omniORB python to generate stubs to
talk to a CORBA server. When a COMM_FAILURE or other system exceptions are
thrown from the CORBA server, these are not being propagated to the
application. The client is quitting after the stubs handle the exception
instead of propagating them to the application code. Is there a way to get
the system exceptions propagated to the application code?</FONT></P>
<P><FONT face=Arial size=2>In the example code below, the exception is not
propagated to the commandexecutor.py module.</FONT> </P>
<P><FONT face=Arial size=2>Thanks</FONT> <BR><FONT face=Arial
size=2>Srikanth</FONT> </P>
<P><FONT face=Arial size=2>example:</FONT> </P><BR>
<P><FONT face=Arial color=#0000ff size=2>03/12/04 22:52:39 : Traceback
(most recent call last):</FONT> <BR><FONT face=Arial color=#0000ff
size=2> File "./commandexecutor.py", line 117, in
executeShowConfigCommand</FONT> <BR><FONT face=Arial color=#0000ff
size=2> exec(commandString, helpers.__dict__,
localStore)</FONT> <BR><FONT face=Arial color=#0000ff size=2> File
"<string>", line 1, in ?</FONT> <BR><FONT face=Arial color=#0000ff
size=2> File
"/opt/ipnos/cli/generated/omniidl/systemservice_idl.py", line 1354, in
showBootConfigConfig</FONT> <BR><FONT face=Arial color=#0000ff
size=2> return _omnipy.invoke(self,
"showBootConfigConfig",
_0_cosinecom.agent.SystemService._d_showBootConfigConfig, args)</FONT>
<BR><FONT face=Arial color=#0000ff size=2>INV_OBJREF: Minor: 0x0,
COMPLETED_NO</FONT> </P></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>