From ee7fc1d14b1a9b677129bb20714b79343a3bad94 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Wed, 6 Apr 2022 17:34:28 -0400
Subject: DRTVWR-558: Change LLEventDispatcher error action (also LLEventAPI).

Originally the LLEventAPI mechanism was primarily used for VITA testing. In
that case it was okay for the viewer to crash with LL_ERRS if the test script
passed a bad request.

With puppetry, hopefully new LEAP scripts will be written to engage
LLEventAPIs in all sorts of interesting ways. Change error handling from
LL_ERRS to LL_WARNS. Furthermore, if the incoming request contains a "reply"
key, send back an error response to the requester.

Update lleventdispatcher_test.cpp accordingly.

(cherry picked from commit de0539fcbe815ceec2041ecc9981e3adf59f2806)
(cherry picked from commit 4b60941952e97691f11806062f4bc66dd5ac8dae)
---
 indra/llcommon/lleventdispatcher.h | 1 +
 1 file changed, 1 insertion(+)

(limited to 'indra/llcommon')

diff --git a/indra/llcommon/lleventdispatcher.h b/indra/llcommon/lleventdispatcher.h
index cf88dced12..09b786b69e 100644
--- a/indra/llcommon/lleventdispatcher.h
+++ b/indra/llcommon/lleventdispatcher.h
@@ -325,6 +325,7 @@ private:
         CLASS* downcast = static_cast<CLASS*>(this);
         add(name, desc, boost::bind(method, downcast, _1), required);
     }
+    void addFail(const std::string& name, const std::string& classname) const;
     std::string try_call_log(const std::string& key, const std::string& name,
                              const LLSD& event) const;
     std::string try_call(const std::string& key, const std::string& name,
-- 
cgit v1.2.3