/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to errors.py

  • Committer: Jelmer Vernooij
  • Date: 2009-09-10 13:13:15 UTC
  • mto: (0.200.602 trunk)
  • mto: This revision was merged to the branch mainline in revision 6960.
  • Revision ID: jelmer@samba.org-20090910131315-6890xg58pl2jseml
Allow serving remote URLs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
    """The base-level exception for bzr-git errors."""
28
28
 
29
29
 
 
30
class GitCommandError(BzrGitError):
 
31
    """Raised when spawning 'git' does not return normally."""
 
32
 
 
33
    _fmt = 'Command failed (%(returncode)s): command %(command)s\n%(stderr)s'
 
34
 
 
35
    def __init__(self, command, returncode, stderr):
 
36
        self.command = command
 
37
        self.returncode = returncode
 
38
        self.stderr = stderr
 
39
 
 
40
 
30
41
class NoSuchRef(BzrGitError):
31
 
    """Raised when a ref can not be found."""
 
42
    """Raised when a ref can not be found.""" 
32
43
 
33
44
    _fmt = "The ref %(ref)s was not found."
34
 
 
 
45
    
35
46
    def __init__(self, ref, present_refs=None):
36
47
        self.ref = ref
37
48
        self.present_refs = present_refs