Re: catching all exceptions [SOLVED]

2005-08-13 Thread a_geek
Hello, Tomasz Lisowski wrote: >> Well, actually the second statement doesn't even compile... any ideas >> why I shouldn't be able to catch "anonymous" exceptions like this, or >> whether and how I can (and only overlooked it)? [ one of three suggestions: ] > Try this: Ok, so the answer simply w

Re: catching all exceptions

2005-08-13 Thread Tomasz Lisowski
> Hello, > > I'd like to catch all exeptions and be able to inspect them. > > The simple case: I know which exceptions I'll get: > > # standard textbook example: > try: > something() > except ThisException, e: > print "some error occurred: ", str(e) > > > The not-so-simple case: Handli

Re: catching all exceptions

2005-08-13 Thread Bengt Richter
On Sat, 13 Aug 2005 17:42:00 +0200, [EMAIL PROTECTED] wrote: >Hello, > >I'd like to catch all exeptions and be able to inspect them. > >The simple case: I know which exceptions I'll get: > ># standard textbook example: >try: >something() >except ThisException, e: >print "some error occurre

Re: catching all exceptions

2005-08-13 Thread Paolino
[EMAIL PROTECTED] wrote: > Hello, > > I'd like to catch all exeptions and be able to inspect them. > > The simple case: I know which exceptions I'll get: > > # standard textbook example: > try: > something() > except ThisException, e: > print "some error occurred: ", str(e) > > > The n

catching all exceptions

2005-08-13 Thread a_geek
Hello, I'd like to catch all exeptions and be able to inspect them. The simple case: I know which exceptions I'll get: # standard textbook example: try: something() except ThisException, e: print "some error occurred: ", str(e) The not-so-simple case: Handling all other exceptions: #