~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-19 12:06:01 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-20050819120601-58525b75283a9c1c
Initial greedy fetch work

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
66
78
            Exception.__init__(self, e)
67
79
        else:
68
80
            Exception.__init__(self)
 
81
 
 
82
 
 
83
class PointlessCommit(Exception):
 
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