~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Robert Collins
  • Date: 2005-08-23 06:52:09 UTC
  • mto: (974.1.50) (1185.1.10) (1092.3.1)
  • mto: This revision was merged to the branch mainline in revision 1139.
  • Revision ID: robertc@robertcollins.net-20050823065209-81cd5962c401751b
move io redirection into each test case from the global runner

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