I'm interested in exploring a custom traceback error handler, but I
can't figure out if it is possible. I'd like to do something like:

#-----------------------------
from mylibrary import *
x = 7 / 0
#-----------------------------

such that I can control what happens when an unhandled exception is
thrown. I want to put something in mylibrary. Now, I know I can:

#-----------------------------
import sys
try:
   x = 7 / 0
except:
   custom_handler(sys.exc_type, sys.exc_value, sys.exc_traceback)
#-----------------------------

but I don't want to surround all of my code in a try/except clause. Is
this possible? Are there hooks into the standard interpreter's
unhandled exception handling?

Thanks for any hints,

-Doug


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"edupython" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/edupython
-~----------~----~----~----~------~----~------~--~---

Reply via email to