258
258
self.args.extend(args)
261
class UnsupportedProtocol(PathError):
262
"""Unsupported protocol for url "%(path)s"%(extra)s"""
264
def __init__(self, url, extra):
265
PathError.__init__(self, url, extra=extra)
261
268
class PathNotChild(BzrNewError):
262
269
"""Path %(path)r is not a child of path %(base)r%(extra)s"""
714
721
self.format = format
717
class TransportError(BzrError):
718
"""All errors thrown by Transport implementations should derive
724
class TransportError(BzrNewError):
725
"""Transport error: %(msg)s %(orig_error)s"""
721
727
def __init__(self, msg=None, orig_error=None):
722
728
if msg is None and orig_error is not None:
723
729
msg = str(orig_error)
724
BzrError.__init__(self, msg)
730
if orig_error is None:
726
735
self.orig_error = orig_error
736
BzrNewError.__init__(self)
729
739
# A set of semi-meaningful errors which can be thrown
730
740
class TransportNotPossible(TransportError):
731
"""This is for transports where a specific function is explicitly not
732
possible. Such as pushing files to an HTTP server.
741
"""Transport operation not possible: %(msg)s %(orig_error)%"""
737
744
class ConnectionError(TransportError):
738
"""A connection problem prevents file retrieval.
739
This does not indicate whether the file exists or not; it indicates that a
740
precondition for requesting the file was not met.
742
def __init__(self, msg=None, orig_error=None):
743
TransportError.__init__(self, msg=msg, orig_error=orig_error)
745
"""Connection error: %(msg)s %(orig_error)s"""
746
748
class ConnectionReset(TransportError):
747
"""The connection has been closed."""
749
"""Connection closed: %(msg)s %(orig_error)s"""
751
752
class ConflictsInTree(BzrError):