~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: Martin Pool
  • Date: 2006-06-04 21:22:51 UTC
  • mto: This revision was merged to the branch mainline in revision 1797.
  • Revision ID: mbp@sourcefrog.net-20060604212251-8f5dc15da9189eac
When an unhandled exception occurs, write the traceback to stderr.

Also encourage the user to send this to the list.

Show diffs side-by-side

added added

removed removed

Lines of Context:
655
655
        # used to handle AssertionError and KeyboardInterrupt
656
656
        # specially here, but hopefully they're handled ok by the logger now
657
657
        import errno
658
 
        if (isinstance(e, IOError) 
 
658
        if (isinstance(e, IOError)
659
659
            and hasattr(e, 'errno')
660
660
            and e.errno == errno.EPIPE):
661
661
            bzrlib.trace.note('broken pipe')
662
662
            return 3
663
663
        else:
664
 
            bzrlib.trace.log_exception()
 
664
            bzrlib.trace.report_unhandled_exception(sys.exc_info(), sys.stderr)
665
665
            if os.environ.get('BZR_PDB'):
666
666
                print '**** entering debugger'
667
667
                import pdb