~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Aaron Bentley
  • Date: 2006-08-22 16:14:17 UTC
  • mto: (1910.2.43 format-bumps)
  • mto: This revision was merged to the branch mainline in revision 1997.
  • Revision ID: abentley@panoramicfeedback.com-20060822161417-29c1eb4790285db9
Back out inter.get changes, make optimizers an ordered list

Show diffs side-by-side

added added

removed removed

Lines of Context:
304
304
(use bzr checkout if you wish to build a working tree): %(path)s"""
305
305
 
306
306
 
 
307
class AtomicFileAlreadyClosed(PathError):
 
308
    """'%(function)s' called on an AtomicFile after it was closed: %(path)s"""
 
309
 
 
310
    def __init__(self, path, function):
 
311
        PathError.__init__(self, path=path, extra=None)
 
312
        self.function = function
 
313
 
 
314
 
 
315
class InaccessibleParent(PathError):
 
316
    """Parent not accessible given base %(base)s and relative path %(path)s"""
 
317
 
 
318
    def __init__(self, path, base):
 
319
        PathError.__init__(self, path)
 
320
        self.base = base
 
321
 
 
322
 
307
323
class NoRepositoryPresent(BzrNewError):
308
324
    """No repository present: %(path)r"""
309
325
    def __init__(self, bzrdir):
930
946
        self.format = format
931
947
 
932
948
 
 
949
class BadConversionTarget(BzrNewError):
 
950
    """Cannot convert to format %(format)s.  %(problem)s"""
 
951
 
 
952
    def __init__(self, problem, format):
 
953
        BzrNewError.__init__(self)
 
954
        self.problem = problem
 
955
        self.format = format
 
956
 
 
957
 
933
958
class NoDiff(BzrNewError):
934
959
    """Diff is not installed on this machine: %(msg)s"""
935
960
 
936
961
    def __init__(self, msg):
937
 
        super(NoDiff, self).__init__(msg=msg)
 
962
        BzrNewError.__init__(self, msg=msg)
938
963
 
939
964
 
940
965
class NoDiff3(BzrNewError):
1045
1070
    """Not a bzr revision-bundle: %(text)r"""
1046
1071
 
1047
1072
    def __init__(self, text):
1048
 
        self.text = text
1049
 
 
1050
 
 
1051
 
class BadBundle(Exception): pass
1052
 
 
1053
 
 
1054
 
class MalformedHeader(BadBundle): pass
1055
 
 
1056
 
 
1057
 
class MalformedPatches(BadBundle): pass
1058
 
 
1059
 
 
1060
 
class MalformedFooter(BadBundle): pass
 
1073
        BzrNewError.__init__(self)
 
1074
        self.text = text
 
1075
 
 
1076
 
 
1077
class BadBundle(BzrNewError): 
 
1078
    """Bad bzr revision-bundle: %(text)r"""
 
1079
 
 
1080
    def __init__(self, text):
 
1081
        BzrNewError.__init__(self)
 
1082
        self.text = text
 
1083
 
 
1084
 
 
1085
class MalformedHeader(BadBundle): 
 
1086
    """Malformed bzr revision-bundle header: %(text)r"""
 
1087
 
 
1088
    def __init__(self, text):
 
1089
        BzrNewError.__init__(self)
 
1090
        self.text = text
 
1091
 
 
1092
 
 
1093
class MalformedPatches(BadBundle): 
 
1094
    """Malformed patches in bzr revision-bundle: %(text)r"""
 
1095
 
 
1096
    def __init__(self, text):
 
1097
        BzrNewError.__init__(self)
 
1098
        self.text = text
 
1099
 
 
1100
 
 
1101
class MalformedFooter(BadBundle): 
 
1102
    """Malformed footer in bzr revision-bundle: %(text)r"""
 
1103
 
 
1104
    def __init__(self, text):
 
1105
        BzrNewError.__init__(self)
 
1106
        self.text = text
 
1107
 
 
1108
class UnsupportedEOLMarker(BadBundle):
 
1109
    """End of line marker was not \\n in bzr revision-bundle"""    
 
1110
 
 
1111
    def __init__(self):
 
1112
        BzrNewError.__init__(self)