Permalink
Browse files

specific handlers can overwrite error handling settings

  • Loading branch information...
1 parent 1d52151 commit bccfe7f109c9b3c8265bcb518ed5a43401cce3a2 @spaceone spaceone committed Feb 15, 2017
Showing with 6 additions and 1 deletion.
  1. +1 −0 circuits/core/handlers.py
  2. +5 −1 circuits/core/manager.py
@@ -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]
@@ -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

0 comments on commit bccfe7f

Please sign in to comment.