diff options
author | Roland Reichwein <mail@reichwein.it> | 2025-01-05 14:09:38 +0100 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2025-01-05 14:09:38 +0100 |
commit | 8295ee7ed24c82eceff15eddc57caa9ab5eda969 (patch) | |
tree | 6569ea3daded284aaa8025e105d8469baf1225ec /main.cpp | |
parent | 535b03b4d8c4ffd606a70508ddb7719095ff1328 (diff) |
Catch errors in ctors
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -1,6 +1,13 @@ #include "MainLoop.h" int main() { - MainLoop main_loop; - return main_loop.run(); + + try { + MainLoop main_loop; + return main_loop.run(); + } catch (const std::exception& ex) { + std::cerr << "Error: " << ex.what() << std::endl; + } + + return 1; } |