CrashHandler

Module: CrashHandler

Inheritance diagram for IPython.CrashHandler:

sys.excepthook for IPython itself, leaves a detailed report on disk.

Authors

Classes

CrashHandler

class IPython.CrashHandler.CrashHandler(IP, app_name, contact_name, contact_email, bug_tracker, crash_report_fname, show_crash_traceback=True)

Customizable crash handlers for IPython-based systems.

Instances of this class provide a __call__ method which can be used as a sys.excepthook, i.e., the __call__ signature is:

def __call__(self,etype, evalue, etb)
__init__(IP, app_name, contact_name, contact_email, bug_tracker, crash_report_fname, show_crash_traceback=True)

New crash handler.

Inputs:

  • IP: a running IPython instance, which will be queried at crash time

for internal information.

  • app_name: a string containing the name of your application.
  • contact_name: a string with the name of the person to contact.
  • contact_email: a string with the email address of the contact.
  • bug_tracker: a string with the URL for your project’s bug tracker.
  • crash_report_fname: a string with the filename for the crash report

to be saved in. These reports are left in the ipython user directory as determined by the running IPython instance.

Optional inputs:

  • show_crash_traceback(True): if false, don’t print the crash

traceback on stderr, only generate the on-disk report

Non-argument instance attributes:

These instances contain some non-argument attributes which allow for further customization of the crash handler’s behavior. Please see the source for further details.

make_report(traceback)
Return a string containing a crash report.

IPythonCrashHandler

class IPython.CrashHandler.IPythonCrashHandler(IP)

Bases: IPython.CrashHandler.CrashHandler

sys.excepthook for IPython itself, leaves a detailed report on disk.

__init__(IP)
make_report(traceback)
Return a string containing a crash report.