2150
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):
2153
2204
class NoDestinationAddress(BzrError):
2155
2206
_fmt = "Message does not have a destination address."