b.e.LockError(InternalBzrError) : class documentation

Part of bzrlib.errors View In Hierarchy

Known subclasses: bzrlib.errors.AlreadyCommitted, bzrlib.errors.CommitNotPossible, bzrlib.errors.LockActive, bzrlib.errors.LockBreakMismatch, bzrlib.errors.LockBroken, bzrlib.errors.LockContention, bzrlib.errors.LockCorrupt, bzrlib.errors.LockFailed, bzrlib.errors.LockNotHeld, bzrlib.errors.ObjectNotLocked, bzrlib.errors.ReadOnlyError, bzrlib.errors.TokenLockingNotSupported, bzrlib.errors.UnlockableTransport, bzrlib.tests.lock_helpers.TestPreventLocking

Method __init__ Construct a new BzrError.

Inherited from BzrError (via InternalBzrError):

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
def __init__(self, msg):
Construct a new BzrError.

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.

ParametersmsgIf 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'.
API Documentation for Bazaar, generated by pydoctor at 2020-07-06 00:55:29.