Avoid GUI actions when crashing out with an uncaught exception

This commit is contained in:
Bill Somerville 2020-09-27 13:25:38 +01:00
parent c1e1f3d46c
commit 9fe3c7123e
No known key found for this signature in database
GPG Key ID: D864B06D1E81618F

View File

@ -3,7 +3,7 @@
#include <QApplication> #include <QApplication>
#include "widgets/MessageBox.hpp" #include "Logger.hpp"
class QObject; class QObject;
class QEvent; class QEvent;
@ -31,12 +31,12 @@ public:
} }
catch (std::exception const& e) catch (std::exception const& e)
{ {
MessageBox::critical_message (nullptr, "Fatal error", e.what ()); LOG_FATAL (e.what ());
throw; throw;
} }
catch (...) catch (...)
{ {
MessageBox::critical_message (nullptr, "Unexpected fatal error"); LOG_FATAL ("Unexpected fatal error");
throw; throw;
} }
} }