create UserError exception
Modules can raise this exception when they want to print errors to user
This commit is contained in:
parent
b4154b5843
commit
aea269e9f6
21 changed files with 68 additions and 47 deletions
|
|
@ -27,7 +27,7 @@ from weboob.tools.misc import to_unicode
|
|||
from weboob.tools.ordereddict import OrderedDict
|
||||
|
||||
|
||||
__all__ = ['FieldNotFound', 'NotAvailable', 'NotLoaded', 'IBaseCap',
|
||||
__all__ = ['UserError', 'FieldNotFound', 'NotAvailable', 'NotLoaded', 'IBaseCap',
|
||||
'Field', 'IntField', 'DecimalField', 'FloatField', 'StringField',
|
||||
'BytesField', 'DateField', 'DeltaField', 'empty', 'CapBaseObject']
|
||||
|
||||
|
|
@ -44,6 +44,12 @@ def empty(value):
|
|||
return False
|
||||
|
||||
|
||||
class UserError(Exception):
|
||||
"""
|
||||
Exception containing an error message for user.
|
||||
"""
|
||||
|
||||
|
||||
class FieldNotFound(Exception):
|
||||
"""
|
||||
A field isn't found.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue