Automatic bug reporting?

Mark McEahern marklists at
Mon Aug 5 14:22:56 CEST 2002

> Is there any module already available that can be used, for example,
> in a "catch all" exception handler to email the developer the
> almost-uncaught exception and its traceback?
> For robustness' sake, my program needs to catch all exceptions and
> keep them from crashing the program, but those exceptions are bugs
> nonetheless and I'd like to get reports of their existence so I can
> fix them.  Of course, any module would be by default disabled and
> would only be enabled at the user's specific request.

One idea would go something like this:

class MyBaseException(Exception):

  def __init__(self, *args, **kwargs):
    # Notify author an exception happened.
    notify(self, *args, **kwargs)

Then, use MyBaseException as the base class for all your exceptions.


// mark


More information about the Python-list mailing list