~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Patch Queue Manager
  • Date: 2011-12-19 17:14:34 UTC
  • mfrom: (6378.1.5 config-si-unit)
  • Revision ID: pqm@pqm.ubuntu.com-20111219171434-i0b4ir0invs9il2v
(vila) Migrate add.maximum_file_size configuration option. (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
700
700
       self.path = urlutils.unescape_for_display(branch.base, 'ascii')
701
701
 
702
702
 
703
 
class AlreadyControlDirError(PathError):
704
 
 
705
 
    _fmt = 'A control directory already exists: "%(path)s".'
706
 
 
707
 
 
708
703
class AlreadyBranchError(PathError):
709
704
 
710
705
    _fmt = 'Already a branch: "%(path)s".'
711
706
 
712
707
 
713
 
class ParentBranchExists(AlreadyBranchError):
714
 
 
715
 
    _fmt = 'Parent branch already exists: "%(path)s".'
716
 
 
717
 
 
718
708
class BranchExistsWithoutWorkingTree(PathError):
719
709
 
720
710
    _fmt = 'Directory contains a branch, but no working tree \
773
763
        self.bzrdir = bzrdir_format
774
764
 
775
765
 
776
 
class ParseFormatError(BzrError):
777
 
 
778
 
    _fmt = "Parse error on line %(lineno)d of %(format)s format: %(line)s"
779
 
 
780
 
    def __init__(self, format, lineno, line, text):
781
 
        BzrError.__init__(self)
782
 
        self.format = format
783
 
        self.lineno = lineno
784
 
        self.line = line
785
 
        self.text = text
786
 
 
787
 
 
788
766
class IncompatibleRepositories(BzrError):
789
767
    """Report an error that two repositories are not compatible.
790
768
 
1677
1655
        TransportError.__init__(self, msg, orig_error=orig_error)
1678
1656
 
1679
1657
 
1680
 
class CertificateError(TransportError):
1681
 
 
1682
 
    _fmt = "Certificate error: %(error)s"
1683
 
 
1684
 
    def __init__(self, error):
1685
 
        self.error = error
1686
 
 
1687
 
 
1688
1658
class InvalidHttpRange(InvalidHttpResponse):
1689
1659
 
1690
1660
    _fmt = "Invalid http range %(range)r for %(path)s: %(msg)s"
1761
1731
 
1762
1732
class ConfigOptionValueError(BzrError):
1763
1733
 
1764
 
    _fmt = ('Bad value "%(value)s" for option "%(name)s".\n'
1765
 
            'See ``bzr help %(name)s``')
 
1734
    _fmt = """Bad value "%(value)s" for option "%(name)s"."""
1766
1735
 
1767
1736
    def __init__(self, name, value):
1768
1737
        BzrError.__init__(self, name=name, value=value)
2768
2737
    _fmt = "No mail-to address (--mail-to) or output (-o) specified."
2769
2738
 
2770
2739
 
 
2740
class UnknownMailClient(BzrError):
 
2741
 
 
2742
    _fmt = "Unknown mail client: %(mail_client)s"
 
2743
 
 
2744
    def __init__(self, mail_client):
 
2745
        BzrError.__init__(self, mail_client=mail_client)
 
2746
 
 
2747
 
2771
2748
class MailClientNotFound(BzrError):
2772
2749
 
2773
2750
    _fmt = "Unable to find mail client with the following names:"\
3265
3242
        self.format = format
3266
3243
 
3267
3244
 
3268
 
class MissingFeature(BzrError):
3269
 
 
3270
 
    _fmt = ("Missing feature %(feature)s not provided by this "
3271
 
            "version of Bazaar or any plugin.")
3272
 
 
3273
 
    def __init__(self, feature):
3274
 
        self.feature = feature
3275
 
 
3276
 
 
3277
3245
class PatchSyntax(BzrError):
3278
3246
    """Base class for patch syntax errors."""
3279
3247
 
3323
3291
        self.line_no = line_no
3324
3292
        self.orig_line = orig_line.rstrip('\n')
3325
3293
        self.patch_line = patch_line.rstrip('\n')
3326
 
 
3327
 
 
3328
 
class FeatureAlreadyRegistered(BzrError):
3329
 
 
3330
 
    _fmt = 'The feature %(feature)s has already been registered.'
3331
 
 
3332
 
    def __init__(self, feature):
3333
 
        self.feature = feature