diff options
author | John Ankarström <john@ankarstrom.se> | 2022-09-07 00:40:26 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-09-07 00:40:26 +0200 |
commit | 2f7b69d6d4cf18ca9ca04d9a44aaa6871ce51160 (patch) | |
tree | d016a9456621b91ca902f0c1caf48468e899a553 /c/err.cpp | |
parent | 5b1a07607ba593050e37598f731f833b6faabee4 (diff) | |
download | EpisodeBrowser-2f7b69d6d4cf18ca9ca04d9a44aaa6871ce51160.tar.gz |
Improve error handling.
Diffstat (limited to 'c/err.cpp')
-rw-r--r-- | c/err.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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); +} |