How to tell if an exception has been caught ( from inside the exception )?

2005-09-22 Thread Paul Dale
Hi everyone, I'm writing an exception that will open a trouble ticket for certain events. Things like network failure. I thought I would like to have it only open a ticket if the exception is not caught. Is there a way to do this inside the Exception? As far as I can see there are only two

Re: How to tell if an exception has been caught ( from inside the exception )?

2005-09-22 Thread Dan
If the exception isn't caught, it is printed to standard error. This means that either __str__ or __repr__ is called (to convert it to a displayable string). If the exception is caught, those methods *probably* won't be called. -- Where you are is not as important as where you are going.

Re: How to tell if an exception has been caught ( from inside the exception )?

2005-09-22 Thread Rocco Moretti
Paul Dale wrote: Hi everyone, I'm writing an exception that will open a trouble ticket for certain events. Things like network failure. I thought I would like to have it only open a ticket if the exception is not caught. Is there a way to do this inside the Exception? As far as I can