From 2f7b69d6d4cf18ca9ca04d9a44aaa6871ce51160 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Wed, 7 Sep 2022 00:40:26 +0200 Subject: Improve error handling. --- c/err.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'c/err.cpp') diff --git a/c/err.cpp b/c/err.cpp index fd35ddd..77bf394 100644 --- a/c/err.cpp +++ b/c/err.cpp @@ -77,11 +77,14 @@ std::wstring What(std::exception_ptr ex) std::rethrow_exception(ex); } catch (const Err& e) { return e.what; - } catch (const WideException& e) { - return e.What(); } catch (const std::exception& e) { return WideFromNarrow(e.what()); } catch (...) { return L"Unknown exception"; } } + +void OnTerminate() +{ + EBMessageBox(What(), L"Fatal Error", MB_ICONERROR); +} -- cgit v1.2.3