Catch error in condition evaluation
And return a better message to users
This commit is contained in:
parent
3bb4b50ba0
commit
af33442ba2
2 changed files with 12 additions and 2 deletions
|
|
@ -33,6 +33,7 @@ from weboob.core.backendscfg import BackendsConfig
|
|||
from weboob.tools.config.iconfig import ConfigError
|
||||
from weboob.tools.log import createColoredFormatter, getLogger
|
||||
from weboob.tools.misc import to_unicode
|
||||
from .results import ResultsConditionError
|
||||
|
||||
__all__ = ['BaseApplication']
|
||||
|
||||
|
|
@ -439,5 +440,8 @@ class BaseApplication(object):
|
|||
except CallErrors as e:
|
||||
app.bcall_errors_handler(e)
|
||||
sys.exit(1)
|
||||
except ResultsConditionError as e:
|
||||
print >>sys.stderr, '%s' % e
|
||||
sys.exit(1)
|
||||
finally:
|
||||
app.deinit()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue