~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Jelmer Vernooij
  • Date: 2011-05-10 07:46:15 UTC
  • mfrom: (5844 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5845.
  • Revision ID: jelmer@samba.org-20110510074615-eptod049ndjxc4i7
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1140
1140
        BzrError.__init__(self, files=files, files_str=files_str)
1141
1141
 
1142
1142
 
 
1143
class ExcludesUnsupported(BzrError):
 
1144
 
 
1145
    _fmt = ('Excluding paths during commit is not supported by '
 
1146
            'repository at %(repository)r.')
 
1147
 
 
1148
    def __init__(self, repository):
 
1149
        BzrError.__init__(self, repository=repository)
 
1150
 
 
1151
 
1143
1152
class BadCommitMessageEncoding(BzrError):
1144
1153
 
1145
1154
    _fmt = 'The specified commit message contains characters unsupported by '\
1757
1766
 
1758
1767
class ParseConfigError(BzrError):
1759
1768
 
 
1769
    _fmt = "Error(s) parsing config file %(filename)s:\n%(errors)s"
 
1770
 
1760
1771
    def __init__(self, errors, filename):
1761
 
        if filename is None:
1762
 
            filename = ""
1763
 
        message = "Error(s) parsing config file %s:\n%s" % \
1764
 
            (filename, ('\n'.join(e.msg for e in errors)))
1765
 
        BzrError.__init__(self, message)
 
1772
        BzrError.__init__(self)
 
1773
        self.filename = filename
 
1774
        self.errors = '\n'.join(e.msg for e in errors)
1766
1775
 
1767
1776
 
1768
1777
class NoEmailInUsername(BzrError):
3240
3249
    def __init__(self, name, string):
3241
3250
        self.name = name
3242
3251
        self.string = string
 
3252
 
 
3253
 
 
3254
class NoCompatibleInter(BzrError):
 
3255
 
 
3256
    _fmt = ('No compatible object available for operations from %(source)r '
 
3257
            'to %(target)r.')
 
3258
 
 
3259
    def __init__(self, source, target):
 
3260
        self.source = source
 
3261
        self.target = target