From c6c400ffc3b0fdb6e46d0894fd448eb611b534a8 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 20 Oct 2024 01:51:55 +0200 Subject: [PATCH] log exceptions not caught --- hyper-main.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hyper-main.cpp b/hyper-main.cpp index 4d0e4441..b6459d64 100644 --- a/hyper-main.cpp +++ b/hyper-main.cpp @@ -77,6 +77,7 @@ EX void hyper_loop() { } EX int hyper_main(int argc, char **argv) { + try { if(!hyper_init(argc, argv)) return 0; #if !ISWEB if(showstartmenu && !vid.skipstart) { @@ -88,7 +89,11 @@ EX int hyper_main(int argc, char **argv) { #endif progress_warning(); mainloop(); - finishAll(); + finishAll(); + } catch(hr_exception& e) { + println(hlog, "exception not caught: ", e.what()); + } + fflush(stdout); return 0; } }