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"""
710
717
self.format = format
713
class TransportError(BzrError):
714
"""All errors thrown by Transport implementations should derive
720
class TransportError(BzrNewError):
721
"""Transport error: %(msg)s %(orig_error)s"""
717
723
def __init__(self, msg=None, orig_error=None):
718
724
if msg is None and orig_error is not None:
719
725
msg = str(orig_error)
720
BzrError.__init__(self, msg)
726
if orig_error is None:
722
731
self.orig_error = orig_error
732
BzrNewError.__init__(self)
725
735
# A set of semi-meaningful errors which can be thrown
726
736
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.
737
"""Transport operation not possible: %(msg)s %(orig_error)%"""
733
740
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)
741
"""Connection error: %(msg)s %(orig_error)s"""
742
744
class ConnectionReset(TransportError):
743
"""The connection has been closed."""
745
"""Connection closed: %(msg)s %(orig_error)s"""
747
748
class ConflictsInTree(BzrError):