Bazaar Apport Integration

Bazaar can use Apport <http://launchpad.net/apport/> to capture data about unexpected errors (probably, bugs in Bazaar) and report them to the developers.

This is only active for errors that are believed to be internal errors (ie bugs) not user or environmental errors. (See the Developer Guide.)

Consequences for users

Implementation notes

The use of apport by Bazaar is independent of the configuration in the OS. For example in Ubuntu, apport is normally inactive in release builds, and normally excludes software not installed from a package. We'll bypass both of them.

Putting in this handler may mean that an OS-wide exception handler never sees the error, but that was true with our existing exception-printer.

The user should have the option to: forget about the crash (and ignore the bug report), see the contents of the report, file a bug, or save the report to file later. At the moment we just show them the filename and let them take it from there.

The process is

  1. An exception reaches the top-level handler.
  2. We log it in apport-format to a file in ~/.bazaar/crash.
  3. We tell the user where that file is, and invite them to file a bug report.

This won't be active for bugs that cause the whole Python interpreter to crash. This can be handled at the OS level. The nice thing is that if apport is active system-wide, it will catch either exceptions in our in-process apport handler, or errors that crash the intrepreter.

Future ideas