/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 breezy/errors.py

  • Committer: Jelmer Vernooij
  • Date: 2017-07-21 13:20:17 UTC
  • mfrom: (6733.1.1 move-errors-config)
  • Revision ID: jelmer@jelmer.uk-20170721132017-oratmmxasovq4r1q
Merge lp:~jelmer/brz/move-errors-config.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1639
1639
    _fmt = "Working tree has conflicts."
1640
1640
 
1641
1641
 
1642
 
class ConfigContentError(BzrError):
1643
 
 
1644
 
    _fmt = "Config file %(filename)s is not UTF-8 encoded\n"
1645
 
 
1646
 
    def __init__(self, filename):
1647
 
        BzrError.__init__(self)
1648
 
        self.filename = filename
1649
 
 
1650
 
 
1651
 
class ParseConfigError(BzrError):
1652
 
 
1653
 
    _fmt = "Error(s) parsing config file %(filename)s:\n%(errors)s"
1654
 
 
1655
 
    def __init__(self, errors, filename):
1656
 
        BzrError.__init__(self)
1657
 
        self.filename = filename
1658
 
        self.errors = '\n'.join(e.msg for e in errors)
1659
 
 
1660
 
 
1661
 
class ConfigOptionValueError(BzrError):
1662
 
 
1663
 
    _fmt = ('Bad value "%(value)s" for option "%(name)s".\n'
1664
 
            'See ``brz help %(name)s``')
1665
 
 
1666
 
    def __init__(self, name, value):
1667
 
        BzrError.__init__(self, name=name, value=value)
1668
 
 
1669
 
 
1670
 
class NoEmailInUsername(BzrError):
1671
 
 
1672
 
    _fmt = "%(username)r does not seem to contain a reasonable email address"
1673
 
 
1674
 
    def __init__(self, username):
1675
 
        BzrError.__init__(self)
1676
 
        self.username = username
1677
 
 
1678
 
 
1679
1642
class DependencyNotPresent(BzrError):
1680
1643
 
1681
1644
    _fmt = 'Unable to import library "%(library)s": %(error)s'
2808
2771
        self.user_encoding = get_user_encoding()
2809
2772
 
2810
2773
 
2811
 
class NoSuchConfig(BzrError):
2812
 
 
2813
 
    _fmt = ('The "%(config_id)s" configuration does not exist.')
2814
 
 
2815
 
    def __init__(self, config_id):
2816
 
        BzrError.__init__(self, config_id=config_id)
2817
 
 
2818
 
 
2819
 
class NoSuchConfigOption(BzrError):
2820
 
 
2821
 
    _fmt = ('The "%(option_name)s" configuration option does not exist.')
2822
 
 
2823
 
    def __init__(self, option_name):
2824
 
        BzrError.__init__(self, option_name=option_name)
2825
 
 
2826
 
 
2827
2774
class NoSuchAlias(BzrError):
2828
2775
 
2829
2776
    _fmt = ('The alias "%(alias_name)s" does not exist.')
3023
2970
        self.controldir = controldir
3024
2971
 
3025
2972
 
3026
 
class NoWhoami(BzrError):
3027
 
 
3028
 
    _fmt = ('Unable to determine your name.\n'
3029
 
        "Please, set your name with the 'whoami' command.\n"
3030
 
        'E.g. brz whoami "Your Name <name@example.com>"')
3031
 
 
3032
 
 
3033
2973
class RecursiveBind(BzrError):
3034
2974
 
3035
2975
    _fmt = ('Branch "%(branch_url)s" appears to be bound to itself. '
3039
2979
        self.branch_url = branch_url
3040
2980
 
3041
2981
 
3042
 
# FIXME: I would prefer to define the config related exception classes in
3043
 
# config.py but the lazy import mechanism proscribes this -- vila 20101222
3044
 
class OptionExpansionLoop(BzrError):
3045
 
 
3046
 
    _fmt = 'Loop involving %(refs)r while expanding "%(string)s".'
3047
 
 
3048
 
    def __init__(self, string, refs):
3049
 
        self.string = string
3050
 
        self.refs = '->'.join(refs)
3051
 
 
3052
 
 
3053
 
class ExpandingUnknownOption(BzrError):
3054
 
 
3055
 
    _fmt = 'Option "%(name)s" is not defined while expanding "%(string)s".'
3056
 
 
3057
 
    def __init__(self, name, string):
3058
 
        self.name = name
3059
 
        self.string = string
3060
 
 
3061
 
 
3062
 
class IllegalOptionName(BzrError):
3063
 
 
3064
 
    _fmt = 'Option "%(name)s" is not allowed.'
3065
 
 
3066
 
    def __init__(self, name):
3067
 
        self.name = name
3068
 
 
3069
 
 
3070
2982
class HpssVfsRequestNotAllowed(BzrError):
3071
2983
 
3072
2984
    _fmt = ("VFS requests over the smart server are not allowed. Encountered: "