howto catch an Exception and still print the TraceBack?
Diez B. Roggisch
deets at nospam.web.de
Wed Feb 1 10:03:15 EST 2006
More information about the Python-list mailing list
Wed Feb 1 10:03:15 EST 2006
- Previous message (by thread): howto catch an Exception and still print the TraceBack?
- Next message (by thread): howto catch an Exception and still print the TraceBack?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Saizan wrote: > In an event-driven application i'd like to keep the program alive > regardless of any exceptions raised by the handlers, but still be able to > debug them by reading the appropriate TraceBack from stderr. I can put > something like: See sys.exc_info() The you can do: try: .... except: # catch all _, e, tb = sys.exc_info() print tb Regards, Diez
- Previous message (by thread): howto catch an Exception and still print the TraceBack?
- Next message (by thread): howto catch an Exception and still print the TraceBack?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list