34
def bailout(msg, explanation=[]):
35
ex = BzrError(msg, explanation)
37
trace._tracefile.write('* raising %s\n' % ex)
32
class BzrCommandError(BzrError):
33
# Error from malformed user command
37
class NotBranchError(BzrError):
38
"""Specified path is not in a branch"""
42
class BadFileKindError(BzrError):
43
"""Specified file is of a kind that cannot be added.
45
(For example a symlink or device file.)"""
49
class ForbiddenFileError(BzrError):
50
"""Cannot operate on a file because it is a control file."""
54
class LockError(Exception):
55
"""All exceptions from the lock/unlock functions should be from
56
this exception class. They will be translated as necessary. The
57
original exception is available as e.original_error
59
def __init__(self, e=None):
60
self.original_error = e
62
Exception.__init__(self, e)
64
Exception.__init__(self)