Skip to content

Commit

Permalink
specific handlers can overwrite error handling settings
Browse files Browse the repository at this point in the history
  • Loading branch information
spaceone committed Feb 15, 2017
1 parent 1d52151 commit bccfe7f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions circuits/core/handlers.py
Expand Up @@ -72,6 +72,7 @@ def wrapper(f):
f.priority = kwargs.get("priority", 0)
f.channel = kwargs.get("channel", None)
f.override = kwargs.get("override", False)
f.on_error = kwargs.get("on_error", None)

args = getargspec(f)[0]

Expand Down
6 changes: 5 additions & 1 deletion circuits/core/manager.py
Expand Up @@ -707,7 +707,11 @@ def _dispatcher(self, event, channels, remaining): # noqa
event.reduce_time_left(TIMEOUT)

if err is not None:
if event.on_error in ("abort", "throw_first"):
if event_handler.on_error in ("abort", "throw_first"):
break
elif event_handler.on_error in ("ignore",):
continue
elif event.on_error in ("abort", "throw_first"):
break
elif event.on_error in ("ignore", "throw_last"):
continue
Expand Down

0 comments on commit bccfe7f

Please sign in to comment.