~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/crash.py

  • Committer: Martin Pool
  • Date: 2009-08-20 04:15:29 UTC
  • mto: This revision was merged to the branch mainline in revision 4632.
  • Revision ID: mbp@sourcefrog.net-20090820041529-igqe98x3qiaaml11
Tweak crash message and use the same one with apport or without.

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
        err_file.write("  %-20s %s [%s]\n" %
66
66
            (name, a_plugin.path(), a_plugin.__version__))
67
67
    err_file.write(
68
 
"""\
69
 
*** Bazaar has encountered an internal error.
70
 
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
71
 
    including this traceback, and a description of what you
72
 
    were doing when the error occurred.
73
 
""")
 
68
        "*** Bazaar has encountered an internal error.  This probably indicates a\n"
 
69
        "*** bug in Bazaar.  You can help us fix it by filing a bug report at\n"
 
70
        "***     https://bugs.launchpad.net/bzr/+filebug\n"
 
71
        "*** including this traceback and a description of the problem.\n"
 
72
        )
74
73
 
75
74
 
76
75
def report_bug_to_apport(exc_info, stderr):
110
109
    finally:
111
110
        crash_file.close()
112
111
 
113
 
    stderr.write("Bazaar has encountered an internal error:\n"
114
 
        "    %s.%s: %s\n"
115
 
        "Details have been written to\n"
116
 
        "    %s\n"
 
112
    stderr.write("bzr: ERROR: %s.%s: %s\n" 
117
113
        "\n"
118
 
        "This probably indicates a bug in Bazaar.  You can help us fix it\n"
119
 
        "by filing a bug report at\n"
120
 
        "    https://bugs.launchpad.net/bzr/+filebug\n"
121
 
        "attaching the crash file, and including a description of the problem.\n"
 
114
        "*** Bazaar has encountered an internal error.  This probably indicates a\n"
 
115
        "*** bug in Bazaar.  You can help us fix it by filing a bug report at\n"
 
116
        "***     https://bugs.launchpad.net/bzr/+filebug\n"
 
117
        "*** attaching the crash file\n"
 
118
        "***     %s\n"
 
119
        "*** and including a description of the problem.\n"
122
120
        % (exc_info[0].__module__, exc_info[0].__name__, exc_info[1],
123
121
           crash_file.name))
124
122
    return True