~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Hermann Kraus
  • Date: 2006-08-06 15:50:07 UTC
  • mto: (1711.2.121 jam-integration)
  • mto: This revision was merged to the branch mainline in revision 1918.
  • Revision ID: hermann@physiklaborant.de-20060806155007-9d2d684d8f04c084
Convert bundle errors from Exception to BzrNewError.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1045
1045
    """Not a bzr revision-bundle: %(text)r"""
1046
1046
 
1047
1047
    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
 
1048
        BzrNewError.__init__(self)
 
1049
        self.text = text
 
1050
 
 
1051
 
 
1052
class BadBundle(BzrNewError): 
 
1053
    """Bad bzr revision-bundle: %(text)r"""
 
1054
 
 
1055
    def __init__(self, text):
 
1056
        BzrNewError.__init__(self)
 
1057
        self.text = text
 
1058
 
 
1059
 
 
1060
class MalformedHeader(BadBundle): 
 
1061
    """Malformed bzr revision-bundle header: %(text)r"""
 
1062
 
 
1063
    def __init__(self, text):
 
1064
        BzrNewError.__init__(self)
 
1065
        self.text = text
 
1066
 
 
1067
 
 
1068
class MalformedPatches(BadBundle): 
 
1069
    """Malformed patches in bzr revision-bundle: %(text)r"""
 
1070
 
 
1071
    def __init__(self, text):
 
1072
        BzrNewError.__init__(self)
 
1073
        self.text = text
 
1074
 
 
1075
 
 
1076
class MalformedFooter(BadBundle): 
 
1077
    """Malformed footer in bzr revision-bundle: %(text)r"""
 
1078
 
 
1079
    def __init__(self, text):
 
1080
        BzrNewError.__init__(self)
 
1081
        self.text = text
 
 
b'\\ No newline at end of file'