From 9fe3c7123e52b1db7ce07e893bd255cd8b030f3d Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Sun, 27 Sep 2020 13:25:38 +0100 Subject: [PATCH] Avoid GUI actions when crashing out with an uncaught exception --- ExceptionCatchingApplication.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ExceptionCatchingApplication.hpp b/ExceptionCatchingApplication.hpp index 657cca8c1..8b23ab4df 100644 --- a/ExceptionCatchingApplication.hpp +++ b/ExceptionCatchingApplication.hpp @@ -3,7 +3,7 @@ #include -#include "widgets/MessageBox.hpp" +#include "Logger.hpp" class QObject; class QEvent; @@ -31,12 +31,12 @@ public: } catch (std::exception const& e) { - MessageBox::critical_message (nullptr, "Fatal error", e.what ()); + LOG_FATAL (e.what ()); throw; } catch (...) { - MessageBox::critical_message (nullptr, "Unexpected fatal error"); + LOG_FATAL ("Unexpected fatal error"); throw; } }