summaryrefslogtreecommitdiff
path: root/indra/test/catch_and_store_what_in.h
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2024-06-10 17:06:06 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2024-06-10 19:25:02 +0300
commit0dcc912cecdfb365c1f4246545ece40ccb7bc18e (patch)
treeccf664c765d1adbbf4985069321df65c85ca36e2 /indra/test/catch_and_store_what_in.h
parentbd8438f7083643ae5812b14e35e69e69ef1616c6 (diff)
parentd317454c82e016a02c8a708a0118f3ff29aa8e82 (diff)
Merge main into inventory_favorites
# Conflicts: # indra/llui/llfolderviewmodel.h # indra/newview/llpanelwearing.cpp # indra/newview/llwearableitemslist.cpp
Diffstat (limited to 'indra/test/catch_and_store_what_in.h')
-rw-r--r--indra/test/catch_and_store_what_in.h70
1 files changed, 35 insertions, 35 deletions
diff --git a/indra/test/catch_and_store_what_in.h b/indra/test/catch_and_store_what_in.h
index 5beba06024..d3dada2acf 100644
--- a/indra/test/catch_and_store_what_in.h
+++ b/indra/test/catch_and_store_what_in.h
@@ -3,7 +3,7 @@
* @author Nat Goodspeed
* @date 2012-02-15
* @brief catch_what() template function, CATCH_AND_STORE_WHAT_IN() macro
- *
+ *
* $LicenseInfo:firstyear=2012&license=viewerlgpl$
* Copyright (c) 2012, Linden Research, Inc.
* $/LicenseInfo$
@@ -64,45 +64,45 @@ std::string catch_what(FUNC func)
* ensure("some_call_that_should_throw_Foo() didn't throw", ! threw.empty());
* @endcode
*/
-#define CATCH_AND_STORE_WHAT_IN(THREW, EXCEPTION) \
-catch (const EXCEPTION& ex) \
-{ \
- (THREW) = ex.what(); \
-} \
+#define CATCH_AND_STORE_WHAT_IN(THREW, EXCEPTION) \
+catch (const EXCEPTION& ex) \
+{ \
+ (THREW) = ex.what(); \
+} \
CATCH_MISSED_LINUX_EXCEPTION(THREW, EXCEPTION)
#ifndef LL_LINUX
-#define CATCH_MISSED_LINUX_EXCEPTION(THREW, EXCEPTION) \
- /* only needed on Linux */
+#define CATCH_MISSED_LINUX_EXCEPTION(THREW, EXCEPTION) \
+ /* only needed on Linux */
#else // LL_LINUX
-#define CATCH_MISSED_LINUX_EXCEPTION(THREW, EXCEPTION) \
-catch (const std::runtime_error& ex) \
-{ \
- /* This clause is needed on Linux, on the viewer side, because */ \
- /* the exception isn't caught by catch (const EXCEPTION&). */ \
- /* But if the expected exception was thrown, allow the test to */ \
- /* succeed anyway. Not sure how else to handle this odd case. */ \
- if (std::string(typeid(ex).name()) == typeid(EXCEPTION).name()) \
- { \
- /* std::cerr << "Caught " << typeid(ex).name() */ \
- /* << " with Linux workaround" << std::endl; */ \
- (THREW) = ex.what(); \
- /*std::cout << ex.what() << std::endl;*/ \
- } \
- else \
- { \
- /* We don't even recognize this exception. Let it propagate */ \
- /* out to TUT to fail the test. */ \
- throw; \
- } \
-} \
-catch (...) \
-{ \
- std::cerr << "Failed to catch expected exception " \
- << #EXCEPTION << "!" << std::endl; \
- /* This indicates a problem in the test that should be addressed. */ \
- throw; \
+#define CATCH_MISSED_LINUX_EXCEPTION(THREW, EXCEPTION) \
+catch (const std::runtime_error& ex) \
+{ \
+ /* This clause is needed on Linux, on the viewer side, because */ \
+ /* the exception isn't caught by catch (const EXCEPTION&). */ \
+ /* But if the expected exception was thrown, allow the test to */ \
+ /* succeed anyway. Not sure how else to handle this odd case. */ \
+ if (std::string(typeid(ex).name()) == typeid(EXCEPTION).name()) \
+ { \
+ /* std::cerr << "Caught " << typeid(ex).name() */ \
+ /* << " with Linux workaround" << std::endl; */ \
+ (THREW) = ex.what(); \
+ /*std::cout << ex.what() << std::endl;*/ \
+ } \
+ else \
+ { \
+ /* We don't even recognize this exception. Let it propagate */ \
+ /* out to TUT to fail the test. */ \
+ throw; \
+ } \
+} \
+catch (...) \
+{ \
+ std::cerr << "Failed to catch expected exception " \
+ << #EXCEPTION << "!" << std::endl; \
+ /* This indicates a problem in the test that should be addressed. */ \
+ throw; \
}
#endif // LL_LINUX