aboutsummaryrefslogtreecommitdiff
path: root/c/err.cpp
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-09-07 00:40:26 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-09-07 00:40:26 +0200
commit2f7b69d6d4cf18ca9ca04d9a44aaa6871ce51160 (patch)
treed016a9456621b91ca902f0c1caf48468e899a553 /c/err.cpp
parent5b1a07607ba593050e37598f731f833b6faabee4 (diff)
downloadEpisodeBrowser-2f7b69d6d4cf18ca9ca04d9a44aaa6871ce51160.tar.gz
Improve error handling.
Diffstat (limited to 'c/err.cpp')
-rw-r--r--c/err.cpp7
1 files changed, 5 insertions, 2 deletions
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);
+}