From 866b25fd014cc50ff2bd1a56d696f4c068e46965 Mon Sep 17 00:00:00 2001 From: Jan Vesely Date: Tue, 17 Jul 2018 02:05:02 -0400 Subject: [PATCH] clover: Catch errors from executing event action Abort all dependent events. v2: Abort the current event as well. CC: Signed-off-by: Jan Vesely Reviewed-by: Francisco Jerez --- src/gallium/state_trackers/clover/core/event.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/clover/core/event.cpp b/src/gallium/state_trackers/clover/core/event.cpp index cd5d786604d..b7eb33dbfc8 100644 --- a/src/gallium/state_trackers/clover/core/event.cpp +++ b/src/gallium/state_trackers/clover/core/event.cpp @@ -49,12 +49,14 @@ event::trigger_self() { } void -event::trigger() { +event::trigger() try { if (wait_count() == 1) action_ok(*this); for (event &ev : trigger_self()) ev.trigger(); +} catch (error &e) { + abort(e.get()); } std::vector> -- 2.30.2