~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/crash.py

  • Committer: Martin Packman
  • Date: 2012-01-05 09:50:04 UTC
  • mfrom: (6424 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6426.
  • Revision ID: martin.packman@canonical.com-20120105095004-mia9xb7y0efmto0v
Merge bzr.dev to resolve conflicts in bzrlib.builtins

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
 
 
18
17
"""Handling and reporting crashes.
19
18
 
20
19
A crash is an exception propagated up almost to the top level of Bazaar.
37
36
-Dno_apport.
38
37
"""
39
38
 
 
39
from __future__ import absolute_import
 
40
 
40
41
# for interactive testing, try the 'bzr assert-fail' command 
41
42
# or see http://code.launchpad.net/~mbp/bzr/bzr-fail
42
43
#
70
71
            return
71
72
    except ImportError, e:
72
73
        trace.mutter("couldn't find apport bug-reporting library: %s" % e)
73
 
        pass
74
74
    except Exception, e:
75
75
        # this should only happen if apport is installed but it didn't
76
76
        # work, eg because of an io error writing the crash file
77
 
        stderr.write("bzr: failed to report crash using apport:\n "
78
 
            "    %r\n" % e)
79
 
        pass
 
77
        trace.mutter("bzr: failed to report crash using apport: %r" % e)
 
78
        trace.log_exception_quietly()
80
79
    return report_bug_legacy(exc_info, stderr)
81
80
 
82
81