clover: Catch errors from executing event action
authorJan Vesely <jan.vesely@rutgers.edu>
Tue, 17 Jul 2018 06:05:02 +0000 (02:05 -0400)
committerJan Vesely <jan.vesely@rutgers.edu>
Wed, 18 Jul 2018 01:04:15 +0000 (21:04 -0400)
Abort all dependent events.
v2: Abort the current event as well.

CC: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
src/gallium/state_trackers/clover/core/event.cpp

index cd5d786604d688ea2c428ce5ae4fbeba58ddad18..b7eb33dbfc8ce938be7d884030d75d841e230e73 100644 (file)
@@ -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<intrusive_ref<event>>