Part of bzrlib.errors View In Hierarchy
Known subclasses: bzrlib.errors.ConnectionError, bzrlib.errors.ConnectionReset, bzrlib.errors.InvalidHttpResponse, bzrlib.errors.InvalidRange, bzrlib.errors.RedirectRequested, bzrlib.errors.SmartProtocolError, bzrlib.errors.TooManyRedirections, bzrlib.errors.TransportNotPossible, bzrlib.errors.UnexpectedProtocolVersionMarker
Method | __init__ | Construct a new BzrError. |
Inherited from BzrError:
Method | __unicode__ | Undocumented |
Method | __str__ | Undocumented |
Method | __repr__ | Undocumented |
Method | __eq__ | Undocumented |
Method | _format | Undocumented |
Method | _get_format_string | Return format string for this exception or None |
There are two alternative forms for constructing these objects. Either a preformatted string may be passed, or a set of named arguments can be given. The first is for generic "user" errors which are not intended to be caught and so do not need a specific subclass. The second case is for use with subclasses that provide a _fmt format string to print the arguments.
Keyword arguments are taken as parameters to the error, which can be inserted into the format string template. It's recommended that subclasses override the __init__ method to require specific parameters.
Parameters | msg | If given, this is the literal complete text for the error, not subject to expansion. 'msg' is used instead of 'message' because python evolved and, in 2.6, forbids the use of 'message'. |