~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: Martin Pool
  • Date: 2005-04-15 09:00:18 UTC
  • Revision ID: mbp@sourcefrog.net-20050415090018-c1d816bde3f2f935
- Show innermost not outermost frame location when reporting
  an exception

Show diffs side-by-side

added added

removed removed

Lines of Context:
1056
1056
    log_error('bzr: ' + summary)
1057
1057
    bzrlib.trace.log_exception(e)
1058
1058
    tb = sys.exc_info()[2]
1059
 
    exinfo = traceback.extract_tb(tb, 1)
 
1059
    exinfo = traceback.extract_tb(tb)
1060
1060
    if exinfo:
1061
 
        sys.stderr.write('  at %s:%d in %s()\n' % exinfo[0][:3])
 
1061
        sys.stderr.write('  at %s:%d in %s()\n' % exinfo[-1][:3])
1062
1062
    sys.stderr.write('  see ~/.bzr.log for debug information\n')
1063
1063
 
1064
1064