Skip to content
Snippets Groups Projects
Commit c2c3086d authored by Nat Goodspeed's avatar Nat Goodspeed
Browse files

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.
parent ceb9d3f7
No related branches found
No related tags found
No related merge requests found
...@@ -95,12 +95,32 @@ struct LLStopWhenHandled ...@@ -95,12 +95,32 @@ struct LLStopWhenHandled
result_type operator()(InputIterator first, InputIterator last) const result_type operator()(InputIterator first, InputIterator last) const
{ {
for (InputIterator si = first; si != last; ++si) for (InputIterator si = first; si != last; ++si)
{ {
if (*si) try
{ {
return true; 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; return false;
} }
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment