Don't allow application to continue after an uncaught exception

Qt does not allow exceptions to pass through the event loop so we must
abort.
This commit is contained in:
Bill Somerville 2021-06-12 02:08:51 +01:00
parent c6b72f497b
commit 87bca164f8
No known key found for this signature in database
GPG Key ID: D864B06D1E81618F
1 changed files with 4 additions and 2 deletions

View File

@ -31,11 +31,13 @@ public:
} }
catch (std::exception const& e) catch (std::exception const& e)
{ {
LOG_FATAL (e.what ()); LOG_FATAL ("Unexpected exception caught in event loop: " << e.what ());
qFatal ("Aborting");
} }
catch (...) catch (...)
{ {
LOG_FATAL ("Unexpected fatal error"); LOG_FATAL ("Unexpected unknown exception caught in event loop");
qFatal ("Aborting");
} }
return false; return false;
} }