Logo Search packages:      
Sourcecode: ipython version File versions  Download package

def IPython::CrashHandler::CrashHandler::__init__ (   self,
  IP,
  app_name,
  contact_name,
  contact_email,
  bug_tracker,
  crash_report_fname,
  show_crash_traceback = True 
) [inherited]

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.

Definition at line 45 of file CrashHandler.py.

                                           :
        """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.
        """

        # apply args into instance
        self.IP = IP  # IPython instance
        self.app_name = app_name
        self.contact_name = contact_name
        self.contact_email = contact_email
        self.bug_tracker = bug_tracker
        self.crash_report_fname = crash_report_fname
        self.show_crash_traceback = show_crash_traceback
        
        # Hardcoded defaults, which can be overridden either by subclasses or
        # at runtime for the instance.

        # Template for the user message.  Subclasses which completely override
        # this, or user apps, can modify it to suit their tastes.  It gets
        # expanded using itpl, so calls of the kind $self.foo are valid.
        self.user_message_template = """
Oops, $self.app_name crashed. We do our best to make it stable, but...

A crash report was automatically generated with the following information:
  - A verbatim copy of the crash traceback.
  - A copy of your input history during this session.
  - Data on your current $self.app_name configuration.

It was left in the file named:
\t'$self.crash_report_fname'
If you can email this file to the developers, the information in it will help
them in understanding and correcting the problem.

You can mail it to: $self.contact_name at $self.contact_email
with the subject '$self.app_name Crash Report'.

If you want to do it now, the following command will work (under Unix):
mail -s '$self.app_name Crash Report' $self.contact_email < $self.crash_report_fname

To ensure accurate tracking of this issue, please file a report about it at:
$self.bug_tracker
"""

    def __call__(self,etype, evalue, etb):


Generated by  Doxygen 1.6.0   Back to index