Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: catching a from CORBA.UserException inherited exception

Reply
Thread Tools

Re: catching a from CORBA.UserException inherited exception

 
 
Peter Otten
Guest
Posts: n/a
 
      08-22-2003
Birgit Rahm wrote:

> 3. then I want to invoke a method within a try - except statement, where
> the except statement has to catch an exception defined in the file created
> in 1. - without the try - exception statement the call is correct with the
> correct parameter and throws an exception (that ends the debugging) with
> an incorrect parameter
> now I wanted to catch the correct exception, but I can only catch
> CORBA.UserException in the right way
>
> What have I to do, to catch the derived exception?


Asuming the userdefined exception MyException is defined in myfile:

import myfile

obj = # your initialization code

try:
obj.methodThatFails()
except myfile.MyException:
print "something went wrong in an organized manner"

I am doubting if that is what you want, though. Maybe you could post some
code and the traceback?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Catching Exception for "Maximum request length exceeded" Chris Hayes ASP .Net 8 10-21-2010 02:02 PM
Exception of type 'System.Web.HttpUnhandledException' wasthrown.Exception has been thrown by the target of an invocation.System.WebSystem.Exception jobs ASP .Net 1 11-16-2007 05:57 PM
'Class.inherited' v. 'inherited' syntax inside Class 7stud -- Ruby 11 11-09-2007 06:45 PM
while executing my client program i get the exception javax.naming.LinkException: [Root exception is javax.naming.LinkException: [Root exception is javax.naming.NameNotFoundException: remaining if plz anybody know how to solve this problem then mahesh Java 0 03-08-2007 12:26 PM
How to catching loading exception? Bob ASP .Net 5 02-19-2005 07:07 AM



Advertisments