March 2003
Intermediate to advanced
656 pages
39h 30m
English
excepthook
excepthook(type,value,traceback)
When an exception is not caught by any handler, Python calls
excepthook, passing it the exception class,
exception object, and traceback object, as covered in Chapter 6. The default excepthook
displays the error and traceback. You can rebind
sys.excepthook to change what is displayed for
uncaught exceptions (just before Python returns to the interactive
loop or terminates). The original value is also available as
sys.__excepthook__.