cathing uncaught exceptions
Alexandru Mosoi
brtzsnr at gmail.com
Mon Aug 18 11:51:41 EDT 2008
On Aug 18, 6:18 pm, Paul McGuire <pt... at austin.rr.com> wrote:
> On Aug 18, 10:02 am, Alexandru Mosoi <brtz... at gmail.com> wrote:
>
> > how can I catch (globally) exception that were not caught in a try/
> > catch block in any running thread? i had this weird case that an
> > exception was raised in one thread, but nothing was displayed/logged.
>
> I suspect that your weird case was *not* because your exception was
> uncaught, but because it *was* caught and just discarded. Look
> through your code for something like this:
>
> except ExceptionIDontExpectToEverGet:
> pass
>
> or even worse:
>
> except:
> pass
>
> I'll bet one of these was your "exception non-logger" culprits.
>
> -- Paul
sorry, no... i used except: print 'something' to validate that there
is an exception that was raised :). otherwise, i avoid your second
construct in my code (just because I don't want to miss strange cases
like this one).
More information about the Python-list
mailing list