/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Andrew Bennetts
  • Date: 2009-01-06 05:59:04 UTC
  • mto: This revision was merged to the branch mainline in revision 3922.
  • Revision ID: andrew.bennetts@canonical.com-20090106055904-vw02l7ut9d1nbfo5
Add test, tweak traceback formatting.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1580
1580
class SmartMessageHandlerError(InternalBzrError):
1581
1581
 
1582
1582
    _fmt = ("The message handler raised an exception:\n"
1583
 
            "%(traceback_text)s%(exc_value)s")
 
1583
            "%(traceback_text)s")
1584
1584
 
1585
1585
    def __init__(self, exc_info):
1586
1586
        import traceback
1587
1587
        self.exc_type, self.exc_value, self.exc_tb = exc_info
1588
1588
        self.exc_info = exc_info
1589
 
        self.traceback_text = ''.join(traceback.format_tb(self.exc_tb))
 
1589
        traceback_strings = traceback.format_exception(
 
1590
                self.exc_type, self.exc_value, self.exc_tb)
 
1591
        self.traceback_text = ''.join(traceback_strings)
1590
1592
 
1591
1593
 
1592
1594
# A set of semi-meaningful errors which can be thrown