=== modified file 'bzrlib/errors.py' --- bzrlib/errors.py +++ bzrlib/errors.py @@ -710,38 +710,32 @@ self.format = format -class TransportError(BzrError): - """All errors thrown by Transport implementations should derive - from this class. - """ +class TransportError(BzrNewError): + """Transport error: %(msg)s %(orig_error)%s""" + def __init__(self, msg=None, orig_error=None): if msg is None and orig_error is not None: msg = str(orig_error) - BzrError.__init__(self, msg) + if orig_error is None: + orig_error = '' + if msg is None: + msg = '' + BzrNewError.__init__(self) self.msg = msg self.orig_error = orig_error # A set of semi-meaningful errors which can be thrown class TransportNotPossible(TransportError): - """This is for transports where a specific function is explicitly not - possible. Such as pushing files to an HTTP server. - """ - pass + """Transport operation not possible: %(msg)s %(orig_error)%""" class ConnectionError(TransportError): - """A connection problem prevents file retrieval. - This does not indicate whether the file exists or not; it indicates that a - precondition for requesting the file was not met. - """ - def __init__(self, msg=None, orig_error=None): - TransportError.__init__(self, msg=msg, orig_error=orig_error) + """Connection error: %(msg)s %(orig_error)s""" class ConnectionReset(TransportError): - """The connection has been closed.""" - pass + """Connection closed: %(msg)s %(orig_error)s""" class ConflictsInTree(BzrError):