~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: INADA Naoki
  • Date: 2011-05-17 00:45:09 UTC
  • mfrom: (5875 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5891.
  • Revision ID: songofacandy@gmail.com-20110517004509-q58negjbdjh7t6u1
mergeĀ fromĀ lp:bzr

Show diffs side-by-side

added added

removed removed

Lines of Context:
1766
1766
 
1767
1767
class ParseConfigError(BzrError):
1768
1768
 
 
1769
    _fmt = "Error(s) parsing config file %(filename)s:\n%(errors)s"
 
1770
 
1769
1771
    def __init__(self, errors, filename):
1770
 
        if filename is None:
1771
 
            filename = ""
1772
 
        message = "Error(s) parsing config file %s:\n%s" % \
1773
 
            (filename, ('\n'.join(e.msg for e in errors)))
1774
 
        BzrError.__init__(self, message)
 
1772
        BzrError.__init__(self)
 
1773
        self.filename = filename
 
1774
        self.errors = '\n'.join(e.msg for e in errors)
1775
1775
 
1776
1776
 
1777
1777
class NoEmailInUsername(BzrError):
3249
3249
    def __init__(self, name, string):
3250
3250
        self.name = name
3251
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