summaryrefslogtreecommitdiff
path: root/FreeFileSync/Source/RealTimeSync/application.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'FreeFileSync/Source/RealTimeSync/application.cpp')
-rw-r--r--FreeFileSync/Source/RealTimeSync/application.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/FreeFileSync/Source/RealTimeSync/application.cpp b/FreeFileSync/Source/RealTimeSync/application.cpp
index 1558ea33..df148001 100644
--- a/FreeFileSync/Source/RealTimeSync/application.cpp
+++ b/FreeFileSync/Source/RealTimeSync/application.cpp
@@ -209,16 +209,12 @@ wxLayoutDirection Application::GetLayoutDirection() const { return fff::getLayou
int Application::OnRun()
{
- [[maybe_unused]] const int rc = wxApp::OnRun();
- return static_cast<int>(FfsExitCode::success); //process exit code
-}
-
-
-void Application::OnUnhandledException() //handles both wxApp::OnInit() + wxApp::OnRun()
-{
try
{
- throw; //just re-throw
+#if wxUSE_EXCEPTIONS
+#error why is wxWidgets uncaught exception handling enabled!?
+#endif
+ [[maybe_unused]] const int rc = wxApp::OnRun();
}
catch (const std::bad_alloc& e) //the only kind of exception we don't want crash dumps for
{
@@ -226,4 +222,5 @@ void Application::OnUnhandledException() //handles both wxApp::OnInit() + wxApp:
terminateProcess(static_cast<int>(FfsExitCode::exception));
}
//catch (...) -> Windows: let it crash and create mini dump!!! Linux/macOS: std::exception::what() logged to console
+ return static_cast<int>(FfsExitCode::success); //process exit code
}
bgstack15