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

  • Committer: John Arbash Meinel
  • Date: 2006-09-12 18:42:49 UTC
  • mto: This revision was merged to the branch mainline in revision 2004.
  • Revision ID: john@arbash-meinel.com-20060912184249-83efc58bcc327550
Add more structured error handling

Show diffs side-by-side

added added

removed removed

Lines of Context:
1178
1178
        else:
1179
1179
            self.extra = ''
1180
1180
 
 
1181
 
 
1182
class InvalidImportLine(BzrNewError):
 
1183
    """Not a valid import statement: %(msg)\n%(text)s"""
 
1184
 
 
1185
    is_user_error = False
 
1186
 
 
1187
    def __init__(self, text, msg):
 
1188
        BzrNewError.__init__(self)
 
1189
        self.text = text
 
1190
        self.msg = msg
 
1191
 
 
1192
 
 
1193
class ImportNameCollision(BzrNewError):
 
1194
    """Tried to import an object to the same name as an existing object. %(name)s"""
 
1195
 
 
1196
    is_user_error = False
 
1197
 
 
1198
    def __init__(self, name):
 
1199
        BzrNewError.__init__(self)
 
1200
        self.name = name