mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
fix: Handling of exceptions that are not being caught
This commit is contained in:
@@ -57,7 +57,15 @@ int main(int argc, char **argv, char **envp) {
|
||||
EventManager::post<RequestOpenFile>(argv[i]);
|
||||
}
|
||||
|
||||
window.loop();
|
||||
try {
|
||||
window.loop();
|
||||
} catch (const std::exception &e) {
|
||||
log::fatal("Exception thrown in main loop: {}", e.what());
|
||||
return EXIT_FAILURE;
|
||||
} catch (...) {
|
||||
log::fatal("Unknown exception thrown in main loop!");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
} while (shouldRestart);
|
||||
|
||||
Reference in New Issue
Block a user