~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to errors.py

  • Committer: Aaron Bentley
  • Date: 2011-04-12 04:51:37 UTC
  • Revision ID: aaron@aaronbentley.com-20110412045137-ni3eart33v4wnlst
Allow zap --branch --store if no uncommitted changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
import os
19
19
 
20
 
class NoPyBaz(Exception):
21
 
    def __init__(self):
22
 
        Exception.__init__(self, "PyBaz is not installed.")
23
20
try:
24
21
    from bzrlib.errors import BzrCommandError as CommandError
25
22
    from bzrlib.errors import BzrError
27
24
    class CommandError(Exception):
28
25
        pass
29
26
 
30
 
class PatchFailed(Exception):
31
 
    """Failed applying patch!"""
 
27
class PatchFailed(BzrError):
 
28
 
 
29
    _fmt = """Patch application failed"""
32
30
 
33
31
 
34
32
class PatchInvokeError(BzrError):
76
74
class ChangedBinaryFiles(BzrError):
77
75
 
78
76
    _fmt = 'Changes involve binary files.'
 
77
 
 
78
 
 
79
class NoConflictFiles(CommandError):
 
80
 
 
81
    _fmt = '%(base_name)s does not exist and there are no pending merges.'
 
82
 
 
83
    def __init__(self, base_name):
 
84
        CommandError.__init__(self, base_name=base_name)