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

Module exception_handler

A top level exception handler that writes uncaught exceptions to a folder in .schrodinger. The user is informed of the error and told to contact customer service.

To activate the exception handler on customer machines but not on developer machines, use exception_handler.enable_if_requested(). That will activate the exception handler only if the environment variable SCHRODINGER_DEV_DEBUG is not defined.

To activate the exception handler regardless of environment variables, use exception_handler.enable_handler(). To deactivate it, use exception_handler.reset_handler().

Classes [hide private]
  ExceptionRecorder
A top level exception handler that writes uncaught exceptions to a folder in .schrodinger.
Functions [hide private]
 
enable_handler(enable=True)
Enable or disable the exception handler.
 
enable_if_requested()
Enable the exception handler unless SCHRODINGER_DEV_DEBUG is set.
Variables [hide private]
  maestro = None
  handler = ExceptionRecorder()
  __package__ = 'schrodinger.infra'
Function Details [hide private]

enable_handler(enable=True)

 

Enable or disable the exception handler.

Parameters:
  • enable (bool) - If True, the exception handler will be enabled. If False, the standard Python exception handler will be enabled.