Skip to content

Commit

Permalink
Fix wrong handler being used for Win32++ exceptions in launcher
Browse files Browse the repository at this point in the history
  • Loading branch information
rafalh committed Sep 15, 2024
1 parent ebc9e13 commit 580c500
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions launcher/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
}

0 comments on commit 580c500

Please sign in to comment.