~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

Include formatted traceback in SmartMessageHandlerError details.
        (Andrew Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1593
1593
 
1594
1594
class SmartMessageHandlerError(InternalBzrError):
1595
1595
 
1596
 
    _fmt = "The message handler raised an exception: %(exc_value)s."
 
1596
    _fmt = ("The message handler raised an exception:\n"
 
1597
            "%(traceback_text)s")
1597
1598
 
1598
1599
    def __init__(self, exc_info):
1599
 
        self.exc_type, self.exc_value, self.tb = exc_info
1600
 
        
 
1600
        import traceback
 
1601
        self.exc_type, self.exc_value, self.exc_tb = exc_info
 
1602
        self.exc_info = exc_info
 
1603
        traceback_strings = traceback.format_exception(
 
1604
                self.exc_type, self.exc_value, self.exc_tb)
 
1605
        self.traceback_text = ''.join(traceback_strings)
 
1606
 
1601
1607
 
1602
1608
# A set of semi-meaningful errors which can be thrown
1603
1609
class TransportNotPossible(TransportError):