~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: aaron.bentley at utoronto
  • Date: 2005-08-18 02:24:28 UTC
  • mto: (1092.1.41) (1185.3.4) (974.1.47)
  • mto: This revision was merged to the branch mainline in revision 1110.
  • Revision ID: aaron.bentley@utoronto.ca-20050818022428-4c0bf84005f4dba8
mergedĀ mbp@sourcefrog.net-20050817233101-0939da1cf91f2472

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
    pass
30
30
 
31
31
 
 
32
class InvalidRevisionNumber(BzrError):
 
33
    def __init__(self, revno):
 
34
        self.args = [revno]
 
35
        
 
36
    def __str__(self):
 
37
        return 'invalid revision number: %r' % self.args[0]
 
38
 
 
39
 
 
40
class InvalidRevisionId(BzrError):
 
41
    pass
 
42
 
 
43
 
32
44
class BzrCommandError(BzrError):
33
45
    # Error from malformed user command
34
46
    pass
70
82
 
71
83
class PointlessCommit(Exception):
72
84
    """Commit failed because nothing was changed."""
 
85
 
 
86
 
 
87
class NoSuchRevision(BzrError):
 
88
    def __init__(self, branch, revision):
 
89
        self.branch = branch
 
90
        self.revision = revision
 
91
        msg = "Branch %s has no revision %s" % (branch, revision)
 
92
        BzrError.__init__(self, msg)
 
93
 
 
94