summaryrefslogtreecommitdiffhomepage
path: root/main.cpp
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2025-01-05 14:09:38 +0100
committerRoland Reichwein <mail@reichwein.it>2025-01-05 14:09:38 +0100
commit8295ee7ed24c82eceff15eddc57caa9ab5eda969 (patch)
tree6569ea3daded284aaa8025e105d8469baf1225ec /main.cpp
parent535b03b4d8c4ffd606a70508ddb7719095ff1328 (diff)
Catch errors in ctors
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/main.cpp b/main.cpp
index 548b8c5..d22442a 100644
--- a/main.cpp
+++ b/main.cpp
@@ -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;
}