summaryrefslogtreecommitdiff
path: root/indra/llcommon/llleap.cpp
diff options
context:
space:
mode:
authornat-goodspeed <nat@lindenlab.com>2023-07-18 18:15:56 +0300
committerGitHub <noreply@github.com>2023-07-18 18:15:56 +0300
commit64a0911eeff765e43e634b7bad857a26cc931ce0 (patch)
tree6019f8ead7a11f745380c83d1967d2136a347177 /indra/llcommon/llleap.cpp
parent4c848c8258aa0f8a29aed0bebf9cdbcf32a2c96f (diff)
parent3b46c892719ced98cdb3265801cd5f62353b3ced (diff)
Merge pull request #280 from secondlife/dispatch-maint-v2
Major improvements to LLLeap functionality
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 c87c0758fe..abbc4185c6 100644
--- a/indra/llcommon/llleap.cpp
+++ b/indra/llcommon/llleap.cpp
@@ -327,11 +327,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())