summaryrefslogtreecommitdiff
path: root/indra/newview/tests
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2019-11-27 22:58:52 +0200
committerAndreyL ProductEngine <alihatskiy@productengine.com>2019-11-27 22:58:52 +0200
commitbc496f5f17a446af27b47cbe227e7e85089bab8d (patch)
treeb7c90fee48d1f48e21c5f62fe84abaca16f8bb81 /indra/newview/tests
parent91c311dd7beb8d723a00efac8e61019eeb8af17b (diff)
parentf89c9e9b20a13acd8f6af76699259cab4c74d5db (diff)
Downstream merge from lindenlab/viewer-lynx
Diffstat (limited to 'indra/newview/tests')
-rw-r--r--indra/newview/tests/llxmlrpclistener_test.cpp24
1 files changed, 6 insertions, 18 deletions
diff --git a/indra/newview/tests/llxmlrpclistener_test.cpp b/indra/newview/tests/llxmlrpclistener_test.cpp
index 6e9756e7d5..dbaae7280c 100644
--- a/indra/newview/tests/llxmlrpclistener_test.cpp
+++ b/indra/newview/tests/llxmlrpclistener_test.cpp
@@ -88,15 +88,9 @@ namespace tut
WrapLLErrs capture;
LLSD request;
request["uri"] = uri;
- std::string threw;
- try
- {
- pumps.obtain("LLXMLRPCTransaction").post(request);
- }
- catch (const WrapLLErrs::FatalException& e)
- {
- threw = e.what();
- }
+ std::string threw = capture.catch_llerrs([&pumps, &request](){
+ pumps.obtain("LLXMLRPCTransaction").post(request);
+ });
ensure_contains("threw exception", threw, "missing params");
ensure_contains("identified missing", threw, "method");
ensure_contains("identified missing", threw, "reply");
@@ -113,15 +107,9 @@ namespace tut
request["reply"] = "reply";
LLSD& params(request["params"]);
params["who"]["specifically"] = "world"; // LLXMLRPCListener only handles scalar params
- std::string threw;
- try
- {
- pumps.obtain("LLXMLRPCTransaction").post(request);
- }
- catch (const WrapLLErrs::FatalException& e)
- {
- threw = e.what();
- }
+ std::string threw = capture.catch_llerrs([&pumps, &request](){
+ pumps.obtain("LLXMLRPCTransaction").post(request);
+ });
ensure_contains("threw exception", threw, "unknown type");
}