diff --git a/launcher/main.cpp b/launcher/main.cpp index 9c66eab0..cf57f180 100644 --- a/launcher/main.cpp +++ b/launcher/main.cpp @@ -42,13 +42,6 @@ int APIENTRY WinMain(HINSTANCE, HINSTANCE, LPSTR, int) try // Run the application return app.Run(); // NOLINT(clang-analyzer-core.StackAddressEscape) } -// catch all unhandled std::exception types -catch (const std::exception& e) { - std::string msg = "Fatal error: "; - msg += generate_message_for_exception(e); - MessageBox(nullptr, msg.c_str(), nullptr, MB_ICONERROR | MB_OK); - return -1; -} // catch all unhandled CException types catch (const Win32xx::CException &e) { // Display the exception and quit @@ -59,3 +52,10 @@ catch (const Win32xx::CException &e) { return -1; } +// catch all unhandled std::exception types +catch (const std::exception& e) { + std::string msg = "Fatal error: "; + msg += generate_message_for_exception(e); + MessageBox(nullptr, msg.c_str(), nullptr, MB_ICONERROR | MB_OK); + return -1; +}