/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

[merge] bzr.dev 1850

Show diffs side-by-side

added added

removed removed

Lines of Context:
258
258
        self.args.extend(args)
259
259
 
260
260
 
 
261
class UnsupportedProtocol(PathError):
 
262
    """Unsupported protocol for url "%(path)s"%(extra)s"""
 
263
 
 
264
    def __init__(self, url, extra):
 
265
        PathError.__init__(self, url, extra=extra)
 
266
 
 
267
 
261
268
class PathNotChild(BzrNewError):
262
269
    """Path %(path)r is not a child of path %(base)r%(extra)s"""
263
270
 
710
717
        self.format = format
711
718
 
712
719
 
713
 
class TransportError(BzrError):
714
 
    """All errors thrown by Transport implementations should derive
715
 
    from this class.
716
 
    """
 
720
class TransportError(BzrNewError):
 
721
    """Transport error: %(msg)s %(orig_error)s"""
 
722
 
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:
 
727
            orig_error = ''
 
728
        if msg is None:
 
729
            msg =  ''
721
730
        self.msg = msg
722
731
        self.orig_error = orig_error
 
732
        BzrNewError.__init__(self)
723
733
 
724
734
 
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.
729
 
    """
730
 
    pass
 
737
    """Transport operation not possible: %(msg)s %(orig_error)%"""
731
738
 
732
739
 
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.
737
 
    """
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"""
740
742
 
741
743
 
742
744
class ConnectionReset(TransportError):
743
 
    """The connection has been closed."""
744
 
    pass
 
745
    """Connection closed: %(msg)s %(orig_error)s"""
745
746
 
746
747
 
747
748
class ConflictsInTree(BzrError):