~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Martin Pool
  • Date: 2005-06-01 04:09:38 UTC
  • Revision ID: mbp@sourcefrog.net-20050601040938-d905145b57ae017f
- unify two defintions of LockError

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
    pass
52
52
 
53
53
 
54
 
class LockError(BzrError):
55
 
    pass
 
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
 
58
    """
 
59
    def __init__(self, e=None):
 
60
        self.original_error = e
 
61
        if e:
 
62
            Exception.__init__(self, e)
 
63
        else:
 
64
            Exception.__init__(self)
 
65
 
56
66
 
57
67
 
58
68
def bailout(msg, explanation=[]):