From 59f8649103c46c5c87d051bc9c8aee325c5254b1 Mon Sep 17 00:00:00 2001 From: Chris Hennes Date: Thu, 20 Feb 2025 22:01:31 -0600 Subject: [PATCH] Base: Stop exception from leaking from Console().* These are sometimes used in destructors, where a raised exception calls terminate() --- src/Base/Console.h | 12 +++++++++++- src/Mod/Spreadsheet/App/Sheet.cpp | 3 ++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/Base/Console.h b/src/Base/Console.h index b2bd857e90..03f41d07ae 100644 --- a/src/Base/Console.h +++ b/src/Base/Console.h @@ -1169,7 +1169,17 @@ template(notifiername, format); diff --git a/src/Mod/Spreadsheet/App/Sheet.cpp b/src/Mod/Spreadsheet/App/Sheet.cpp index b810357488..55cf1b1ba5 100644 --- a/src/Mod/Spreadsheet/App/Sheet.cpp +++ b/src/Mod/Spreadsheet/App/Sheet.cpp @@ -24,6 +24,7 @@ #ifndef _PreComp_ #include +#include #include #include #include @@ -107,7 +108,7 @@ Sheet::~Sheet() try { clearAll(); } - catch (boost::wrapexcept&) { + catch (boost::regex_error&) { // Don't let an exception propagate out of a destructor (calls terminate()) Base::Console().Error( "clearAll() resulted in an exception when deleting the spreadsheet : %s\n",