From dd3f85d1a1b4d043fa7e86ab83508c6fa1a61345 Mon Sep 17 00:00:00 2001 From: wmayer Date: Fri, 13 May 2016 12:12:17 +0200 Subject: [PATCH] + handle also std::exception when application unexpectedly leaves event loop --- src/Gui/Application.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Gui/Application.cpp b/src/Gui/Application.cpp index b414ad14b..3bc2f515a 100644 --- a/src/Gui/Application.cpp +++ b/src/Gui/Application.cpp @@ -1826,6 +1826,12 @@ void Application::runApplication(void) Base::Console().Message("System exit\n"); throw; } + catch (const std::exception& e) { + // catching nasty stuff coming out of the event loop + App::Application::destructObserver(); + Base::Console().Error("Event loop left through unhandled exception: %s\n", e.what()); + throw; + } catch (...) { // catching nasty stuff coming out of the event loop App::Application::destructObserver();