Getting the Traceback ?

Oleg Broytmann phd at phd.russ.ru
Fri Mar 24 06:01:53 EST 2000


On Fri, 24 Mar 2000, Matthias Barmeier wrote:
> The Question:
> 	Is it possible to get the trace back message and the error 
> 	message displayed by the default exception handler ?

try:
   do_something()

except: # Catch-all
   import traceback
   traceback.print_exc()

   There are more than just print_exc in trcaeback.py - just examine it.

Oleg.
---- 
    Oleg Broytmann      Foundation for Effective Policies      phd at phd.russ.ru
           Programmers don't die, they just GOSUB without RETURN.





More information about the Python-list mailing list