From ed3bcd3dd2ab520187246d3e7bcfb5010671d6fb Mon Sep 17 00:00:00 2001 From: Scott Hutchinson Date: Mon, 12 Dec 2022 08:59:37 -0800 Subject: [PATCH] Fix build errors. --- include/internal/catch_fatal_condition.cpp | 4 +--- include/internal/catch_fatal_condition.h | 2 +- projects/SelfTest/UsageTests/Misc.tests.cpp | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/include/internal/catch_fatal_condition.cpp b/include/internal/catch_fatal_condition.cpp index a6663f71..36e418ff 100644 --- a/include/internal/catch_fatal_condition.cpp +++ b/include/internal/catch_fatal_condition.cpp @@ -127,9 +127,7 @@ namespace Catch { void FatalConditionHandler::disengage_platform() noexcept { if (SetUnhandledExceptionFilter(previousTopLevelExceptionFilter) != topLevelExceptionFilter) { - Catch::cerr() - << "Unexpected SEH unhandled exception filter on disengage." - << " The filter was restored, but might be rolled back unexpectedly."; + CATCH_RUNTIME_ERROR("Could not restore previous top level exception filter"); } previousTopLevelExceptionFilter = nullptr; } diff --git a/include/internal/catch_fatal_condition.h b/include/internal/catch_fatal_condition.h index b5744f8f..1b6c5613 100644 --- a/include/internal/catch_fatal_condition.h +++ b/include/internal/catch_fatal_condition.h @@ -31,7 +31,7 @@ namespace Catch { // Should be if-defed to work on current platform, can assume // engage-disengage 1:1 pairing. void engage_platform(); - void disengage_platform(); + void disengage_platform() noexcept; public: // Should also have platform-specific implementations as needed FatalConditionHandler(); diff --git a/projects/SelfTest/UsageTests/Misc.tests.cpp b/projects/SelfTest/UsageTests/Misc.tests.cpp index 8a655226..87670cd0 100644 --- a/projects/SelfTest/UsageTests/Misc.tests.cpp +++ b/projects/SelfTest/UsageTests/Misc.tests.cpp @@ -522,7 +522,7 @@ TEST_CASE("Validate SEH behavior - unhandled", "[.approvals][FatalConditionHandl throw_no_catch(); } -static LONG CALLBACK dummyExceptionFilter(PEXCEPTION_POINTERS ExceptionInfo) { +static LONG CALLBACK dummyExceptionFilter(PEXCEPTION_POINTERS /*ExceptionInfo*/) { return EXCEPTION_CONTINUE_SEARCH; }