Re: newb: Question regarding custom exception

2007-09-23 Thread Lawrence Oluyede
crybaby <[EMAIL PROTECTED]> wrote: > Why you specify type and name of the exception in your custom > exceptions, It's up to you, if you're interested in the actual exception object you catch it, otherwise not. Take a look at this: -- Law

Re: newb: Question regarding custom exception

2007-09-23 Thread Steven D'Aprano
On Sun, 23 Sep 2007 05:32:28 -0700, crybaby wrote: > Why you specify type and name of the exception in your custom > exceptions, > but not in built in exceptions > except IOError: > print "no file by the name ccy_rates*.txt" > > except MyError, e: > print e.msg Yo

newb: Question regarding custom exception

2007-09-23 Thread crybaby
Why you specify type and name of the exception in your custom exceptions, but not in built in exceptions except IOError: print "no file by the name ccy_rates*.txt" except MyError, e: print e.msg Also, when you do: try: raise MyError(23) In "try: MyError(23) ", y