diff options
| author | AndreyL ProductEngine <alihatskiy@productengine.com> | 2019-11-27 08:19:22 +0200 |
|---|---|---|
| committer | AndreyL ProductEngine <alihatskiy@productengine.com> | 2019-11-27 08:19:22 +0200 |
| commit | d0c7b4fade611bb3bd05a4e6230145b1babc9f7f (patch) | |
| tree | 96edb360c7cacaef64a4b865e7d97c9ef8404669 /indra/llcommon/tests/lleventcoro_test.cpp | |
| parent | 49216183902045a2b9ba4a0627eb4298a65c004c (diff) | |
| parent | 78bdf57ad6610b34389226bf941ba736ca0c2225 (diff) | |
Merged in lindenlab/viewer-release
Diffstat (limited to 'indra/llcommon/tests/lleventcoro_test.cpp')
| -rw-r--r-- | indra/llcommon/tests/lleventcoro_test.cpp | 33 |
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 } |
