710
710
self.format = format
713
class TransportError(BzrError):
714
"""All errors thrown by Transport implementations should derive
713
class TransportError(BzrNewError):
714
"""Transport error: %(msg)s %(orig_error)s"""
717
716
def __init__(self, msg=None, orig_error=None):
718
717
if msg is None and orig_error is not None:
719
718
msg = str(orig_error)
720
BzrError.__init__(self, msg)
719
if orig_error is None:
722
724
self.orig_error = orig_error
725
BzrNewError.__init__(self)
725
728
# A set of semi-meaningful errors which can be thrown
726
729
class TransportNotPossible(TransportError):
727
"""This is for transports where a specific function is explicitly not
728
possible. Such as pushing files to an HTTP server.
730
"""Transport operation not possible: %(msg)s %(orig_error)%"""
733
733
class ConnectionError(TransportError):
734
"""A connection problem prevents file retrieval.
735
This does not indicate whether the file exists or not; it indicates that a
736
precondition for requesting the file was not met.
738
def __init__(self, msg=None, orig_error=None):
739
TransportError.__init__(self, msg=msg, orig_error=orig_error)
734
"""Connection error: %(msg)s %(orig_error)s"""
742
737
class ConnectionReset(TransportError):
743
"""The connection has been closed."""
738
"""Connection closed: %(msg)s %(orig_error)s"""
747
741
class ConflictsInTree(BzrError):