summaryrefslogtreecommitdiff
path: root/indra/llcommon/tests/lleventcoro_test.cpp
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/llcommon/tests/lleventcoro_test.cpp
parent91c311dd7beb8d723a00efac8e61019eeb8af17b (diff)
parentf89c9e9b20a13acd8f6af76699259cab4c74d5db (diff)
Downstream merge from lindenlab/viewer-lynx
Diffstat (limited to 'indra/llcommon/tests/lleventcoro_test.cpp')
-rw-r--r--indra/llcommon/tests/lleventcoro_test.cpp33
1 files changed, 11 insertions, 22 deletions
diff --git a/indra/llcommon/tests/lleventcoro_test.cpp b/indra/llcommon/tests/lleventcoro_test.cpp
index a459d17fb8..fa02d2bb1a 100644
--- a/indra/llcommon/tests/lleventcoro_test.cpp
+++ b/indra/llcommon/tests/lleventcoro_test.cpp
@@ -506,16 +506,10 @@ namespace tut
replyName = waiter.getName0();
errorName = waiter.getName1();
WrapLLErrs capture;
- try
- {
- result = waiter.suspendWithLog();
- debug("no exception");
- }
- catch (const WrapLLErrs::FatalException& e)
- {
- debug(STRINGIZE("exception " << e.what()));
- threw = e.what();
- }
+ threw = capture.catch_llerrs([&waiter, &debug](){
+ result = waiter.suspendWithLog();
+ debug("no exception");
+ });
}
END
}
@@ -762,18 +756,13 @@ namespace tut
{
LLCoroEventPumps waiter;
WrapLLErrs capture;
- try
- {
- result = waiter.postAndSuspendWithLog(
- LLSDMap("value", 31)("fail", LLSD()),
- immediateAPI.getPump(), "reply", "error");
- debug("no exception");
- }
- catch (const WrapLLErrs::FatalException& e)
- {
- debug(STRINGIZE("exception " << e.what()));
- threw = e.what();
- }
+ threw = capture.catch_llerrs(
+ [&waiter, &debug](){
+ result = waiter.postAndSuspendWithLog(
+ LLSDMap("value", 31)("fail", LLSD()),
+ immediateAPI.getPump(), "reply", "error");
+ debug("no exception");
+ });
}
END
}