diff options
author | AndreyL ProductEngine <alihatskiy@productengine.com> | 2019-11-12 02:37:15 +0200 |
---|---|---|
committer | AndreyL ProductEngine <alihatskiy@productengine.com> | 2019-11-12 02:37:15 +0200 |
commit | 5f731d84cb5823bdc4cae5be288f2de2ffb9f5f9 (patch) | |
tree | 04ddffec7d5a004150aefd5fdbf247863e2a8926 /indra/newview/tests | |
parent | 4aa9dfec746f28696a195fe81aed9b6ef0791954 (diff) | |
parent | e96d0d5e304324e6ab0c469773fb7110a65fc3f1 (diff) |
Downstream merge from 494-maint-wassail
Diffstat (limited to 'indra/newview/tests')
-rw-r--r-- | indra/newview/tests/llxmlrpclistener_test.cpp | 24 |
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"); } |