186
186
self.class_name = class_name
189
class IncompatibleAPI(BzrError):
191
_fmt = 'The API for "%(api)s" is not compatible with "%(wanted)s". '\
192
'It supports versions "%(minimum)s" to "%(current)s".'
194
def __init__(self, api, wanted, minimum, current):
197
self.minimum = minimum
198
self.current = current
189
201
class InvalidEntryName(BzrError):
191
203
_fmt = "Invalid entry name: %(name)s"
2135
2149
def __init__(self, response_tuple):
2136
2150
self.response_tuple = response_tuple
2153
class ContainerError(BzrError):
2154
"""Base class of container errors."""
2157
class UnknownContainerFormatError(ContainerError):
2159
_fmt = "Unrecognised container format: %(container_format)r"
2161
def __init__(self, container_format):
2162
self.container_format = container_format
2165
class UnexpectedEndOfContainerError(ContainerError):
2167
_fmt = "Unexpected end of container stream"
2169
internal_error = False
2172
class UnknownRecordTypeError(ContainerError):
2174
_fmt = "Unknown record type: %(record_type)r"
2176
def __init__(self, record_type):
2177
self.record_type = record_type
2180
class InvalidRecordError(ContainerError):
2182
_fmt = "Invalid record: %(reason)s"
2184
def __init__(self, reason):
2185
self.reason = reason
2188
class ContainerHasExcessDataError(ContainerError):
2190
_fmt = "Container has data after end marker: %(excess)r"
2192
def __init__(self, excess):
2193
self.excess = excess
2196
class DuplicateRecordNameError(ContainerError):
2198
_fmt = "Container has multiple records with the same name: \"%(name)s\""
2200
def __init__(self, name):
2204
class NoDestinationAddress(BzrError):
2206
_fmt = "Message does not have a destination address."
2208
internal_error = True
2211
class SMTPError(BzrError):
2213
_fmt = "SMTP error: %(error)s"
2215
def __init__(self, error):