diff options
author | VG <vg@devys.org> | 2016-06-10 17:44:11 +0200 |
---|---|---|
committer | VG <vg@devys.org> | 2016-06-10 17:44:11 +0200 |
commit | 6e62cf116d561dcb8c7b72c9c5165db97706fec8 (patch) | |
tree | d7a466bbd80e9b6d569adf45d4ff7381a8749163 /climl/__init__.py | |
parent | 6e7f287497e0dc9aec33c5cda1428cea2637ba79 (diff) | |
download | climl-6e62cf116d561dcb8c7b72c9c5165db97706fec8.tar.gz climl-6e62cf116d561dcb8c7b72c9c5165db97706fec8.tar.bz2 climl-6e62cf116d561dcb8c7b72c9c5165db97706fec8.zip |
display better messages when catching interface exceptions
Diffstat (limited to 'climl/__init__.py')
-rw-r--r-- | climl/__init__.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/climl/__init__.py b/climl/__init__.py index 8924ebf..b4ccecf 100644 --- a/climl/__init__.py +++ b/climl/__init__.py @@ -18,10 +18,10 @@ def on_email(content, hooks, conf): print('on_email, calling hook {}'.format(hook.__name__)) hook(context) print('on_email, end of hook {}'.format(hook.__name__)) - except interface.HookStopIteration: - pass + except interface.HookStopIteration as e: + print('hook wanted to stop processing for current email', e) print('now, raising exception (for dev purpose only)') - raise interface.HookAbortError() + raise interface.HookAbortError('dev purpose abort') def conf_boolean_postprocess(src): |