~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: John Arbash Meinel
  • Date: 2006-09-12 17:33:23 UTC
  • mto: This revision was merged to the branch mainline in revision 2004.
  • Revision ID: john@arbash-meinel.com-20060912173323-112d28652516fd94
Raise an exception when ScopeReplacer has been misused

Show diffs side-by-side

added added

removed removed

Lines of Context:
1162
1162
    def __init__(self, revision_id):
1163
1163
        BzrNewError.__init__(self)
1164
1164
        self.revision_id = revision_id
 
1165
 
 
1166
 
 
1167
class IllegalUseOfScopeReplacer(BzrNewError):
 
1168
    """ScopeReplacer object %(name)r was used incorrectly: %(msg)s%(extra)s"""
 
1169
 
 
1170
    is_user_error = False
 
1171
 
 
1172
    def __init__(self, name, msg, extra=None):
 
1173
        BzrNewError.__init__(self)
 
1174
        self.name = name
 
1175
        self.msg = msg
 
1176
        if extra:
 
1177
            self.extra = ': ' + str(extra)
 
1178
        else:
 
1179
            self.extra = ''
 
1180