Package schrodinger :: Package infra :: Module exception_handler
[hide private]
[frames] | no frames]

Module exception_handler

A top level Python exception handler that prevents uncaught exceptions in Python scripts from crashing Maestro.

To activate the exception handler use exception_handler.set_exception_handler(). That will activate the appropriate exception handler.

If SCHRODINGER_DEV_DEBUG or SCHRODINGER_SRC are defined, we install a handler that simply prints tracebacks to the terminal. Otherwise (generally on customer machines), we install a handler that writes uncaught exceptions to a folder in .schrodinger. The user is informed of the error and told to contact customer service.

Classes [hide private]
  ExceptionRecorder
A top level exception handler that writes uncaught exceptions to a folder in .schrodinger.
Functions [hide private]
 
get_exception_handler()
Returns the appropriate exception handler, depending on values in the user's environment.
 
set_exception_handler(handler=None)
Sets the appropriate top-level Python exception handler.
Variables [hide private]
  maestro = None
  customer_handler = ExceptionRecorder()
  __package__ = 'schrodinger.infra'
Function Details [hide private]

set_exception_handler(handler=None)

 

Sets the appropriate top-level Python exception handler. We use one for customers and another for developers.