summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2016-08-26 15:50:37 -0400
committerNat Goodspeed <nat@lindenlab.com>2016-08-26 15:50:37 -0400
commitc2c3086d6c153883a43664446ac3f05a11a61a96 (patch)
tree3d8f15e875aec5c3d5f51e9d4ae16d6b4a3b4749 /indra/llcommon
parentceb9d3f7f11ee659c73cda3fb52231bb8a44476b (diff)
MAINT-5011: Catch LLContinueError in LLStopWhenHandled::operator().
This means that an exception derived from LLContinueError thrown in an LLEventPump listener won't prevent other listeners on the same LLEventPump from receiving that event.
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/llevents.h32
1 files changed, 26 insertions, 6 deletions
diff --git a/indra/llcommon/llevents.h b/indra/llcommon/llevents.h
index 8ff337911d..1526128725 100644
--- a/indra/llcommon/llevents.h
+++ b/indra/llcommon/llevents.h
@@ -95,12 +95,32 @@ struct LLStopWhenHandled
result_type operator()(InputIterator first, InputIterator last) const
{
for (InputIterator si = first; si != last; ++si)
- {
- if (*si)
- {
- return true;
- }
- }
+ {
+ try
+ {
+ if (*si)
+ {
+ return true;
+ }
+ }
+ catch (const LLContinueError&)
+ {
+ // We catch LLContinueError here because an LLContinueError-
+ // based exception means the viewer as a whole should carry on
+ // to the best of our ability. Therefore subsequent listeners
+ // on the same LLEventPump should still receive this event.
+
+ // The iterator passed to a boost::signals2 Combiner is very
+ // clever, but provides no contextual information. We would
+ // very much like to be able to log the name of the LLEventPump
+ // plus the name of this particular listener, but alas.
+ LOG_UNHANDLED_EXCEPTION("LLEventPump");
+ }
+ // We do NOT catch (...) here because we might as well let it
+ // propagate out to the generic handler. If we were able to log
+ // context information here, that would be great, but we can't, so
+ // there's no point.
+ }
return false;
}
};