37
def bailout(msg, explanation=[]):
38
ex = BzrError(msg, explanation)
40
trace._tracefile.write('* raising %s\n' % ex)
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."""