Catch error in condition evaluation

And return a better message to users
This commit is contained in:
Florent 2014-01-06 15:02:04 +01:00
commit af33442ba2
2 changed files with 12 additions and 2 deletions

View file

@ -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()