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; }