diff options
| author | AndreyL ProductEngine <alihatskiy@productengine.com> | 2019-11-12 00:39:07 +0200 |
|---|---|---|
| committer | AndreyL ProductEngine <alihatskiy@productengine.com> | 2019-11-12 00:39:07 +0200 |
| commit | 84f3b2865fe3ec2a3dfb0a96ed0389381cebeed5 (patch) | |
| tree | 1490249690bb3c7c0509e8ad73e2b7f7748d9dba /indra/newview/tests | |
| parent | 6ec37fac60c0288e576b72b91b16d74b37dbc32d (diff) | |
| parent | 78bdf57ad6610b34389226bf941ba736ca0c2225 (diff) | |
Merged in lindenlab/viewer-release
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"); } |
