configure_excepthook#
- composer.utils.configure_excepthook()[source]#
Collect and print system information when
sys.excepthook()
is called.The custom exception handler causes an exception message to be printed when
sys.excepthook()
is called. The exception message provides the user with information on the nature of the exception and directs the user to file GitHub issues as appropriate.By default, the custom exception handler also generates an environment report users can attach to bug reports. Environment report generation can be optionally enabled/disabled by using the
enable_env_report()
anddisable_env_report()
helper functions, respectively.Additioanlly, the custom exceptionhook checks if the user is running from an IPython session and sets up the custom exception handler accordingly.
To override the default
sys.excepthook()
with the custom except hook:>>> configure_excepthook() >>> sys.excepthook <function _custom_exception_handler at ...>