~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/trace.py

  • Committer: Martin Pool
  • Date: 2006-10-26 14:30:28 UTC
  • mto: This revision was merged to the branch mainline in revision 2115.
  • Revision ID: mbp@sourcefrog.net-20061026143028-a4c4afcaa1778605
Add new -Derror global option to always display tracebacks

Show diffs side-by-side

added added

removed removed

Lines of Context:
281
281
 
282
282
# TODO: Should these be specially encoding the output?
283
283
def report_user_error(exc_info, err_file):
 
284
    """Report to err_file an error that's not an internal error.
 
285
 
 
286
    These don't get a traceback unless -Derror was given.
 
287
    """
 
288
    if 'error' in bzrlib.debug_flags:
 
289
        report_bug(exc_info, err_file)
 
290
        return
284
291
    print >>err_file, "bzr: ERROR:", str(exc_info[1])
285
292
 
286
293