diff --git a/src/test/util/logging.h b/src/test/util/logging.h index 73ac23825f9..5d7e4f91e0f 100644 --- a/src/test/util/logging.h +++ b/src/test/util/logging.h @@ -33,7 +33,9 @@ class DebugLogHelper public: explicit DebugLogHelper(std::string message, MatchFn match = [](const std::string*){ return true; }); - ~DebugLogHelper() { check_found(); } + + //! Mark as noexcept(false) to catch any thrown exceptions. + ~DebugLogHelper() noexcept(false) { check_found(); } }; #define ASSERT_DEBUG_LOG(message) DebugLogHelper UNIQUE_NAME(debugloghelper)(message)