summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-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..f9a4ec373a 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 = 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 = catch_llerrs([&pumps, &request](){
+ pumps.obtain("LLXMLRPCTransaction").post(request);
+ });
ensure_contains("threw exception", threw, "unknown type");
}