32
class BzrCommandError(BzrError):
33
# Error from malformed user command
37
class NotBranchError(BzrError):
38
"""Specified path is not in a branch"""
42
class NotVersionedError(BzrError):
43
"""Specified object is not versioned."""
46
class BadFileKindError(BzrError):
47
"""Specified file is of a kind that cannot be added.
49
(For example a symlink or device file.)"""
53
class ForbiddenFileError(BzrError):
54
"""Cannot operate on a file because it is a control file."""
58
class LockError(Exception):
59
"""All exceptions from the lock/unlock functions should be from
60
this exception class. They will be translated as necessary. The
61
original exception is available as e.original_error
63
def __init__(self, e=None):
64
self.original_error = e
66
Exception.__init__(self, e)
68
Exception.__init__(self)
71
class PointlessCommit(Exception):
72
"""Commit failed because nothing was changed."""
34
def bailout(msg, explanation=[]):
35
ex = BzrError(msg, explanation)
37
trace._tracefile.write('* raising %s\n' % ex)