summaryrefslogtreecommitdiff
path: root/indra/llcommon/llleap.cpp
diff options
context:
space:
mode:
authorSignal Linden <signal@lindenlab.com>2023-11-21 08:07:20 -0800
committerGitHub <noreply@github.com>2023-11-21 08:07:20 -0800
commit5416d94d07ac85ba384fafb0b0b1b11b8cd0b6e4 (patch)
tree1c4fd503f43d628dd6223af44aa14921357ae0ab /indra/llcommon/llleap.cpp
parent9b50c50bf2fe3fab2dbb0bcd18d7c8f5b9a13a1b (diff)
parent62c7a17604ba4faec989465a374e7ed7627ec56b (diff)
Merge branch 'DRTVWR-587-maint-V' into signal/simple-release
Diffstat (limited to 'indra/llcommon/llleap.cpp')
-rw-r--r--indra/llcommon/llleap.cpp27
1 files changed, 22 insertions, 5 deletions
diff --git a/indra/llcommon/llleap.cpp b/indra/llcommon/llleap.cpp
index 5b5bf97cef..8f88e728ce 100644
--- a/indra/llcommon/llleap.cpp
+++ b/indra/llcommon/llleap.cpp
@@ -340,11 +340,28 @@ public:
}
else
{
- // The LLSD object we got from our stream contains the keys we
- // need.
- LLEventPumps::instance().obtain(data["pump"]).post(data["data"]);
- // Block calls to this method; resetting mBlocker unblocks calls
- // to the other method.
+ try
+ {
+ // The LLSD object we got from our stream contains the
+ // keys we need.
+ LLEventPumps::instance().obtain(data["pump"]).post(data["data"]);
+ }
+ catch (const std::exception& err)
+ {
+ // No plugin should be allowed to crash the viewer by
+ // driving an exception -- intentionally or not.
+ LOG_UNHANDLED_EXCEPTION(stringize("handling request ", data));
+ // Whether or not the plugin added a "reply" key to the
+ // request, send a reply. We happen to know who originated
+ // this request, and the reply LLEventPump of interest.
+ // Not our problem if the plugin ignores the reply event.
+ data["reply"] = mReplyPump.getName();
+ sendReply(llsd::map("error",
+ stringize(LLError::Log::classname(err), ": ", err.what())),
+ data);
+ }
+ // Block calls to this method; resetting mBlocker unblocks
+ // calls to the other method.
mBlocker.reset(new LLEventPump::Blocker(mStdoutDataConnection));
// Go check for any more pending events in the buffer.
if (childout.size())