aboutsummaryrefslogtreecommitdiff
path: root/c/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'c/util.h')
-rw-r--r--c/util.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/c/util.h b/c/util.h
index 729e64d..0d8a835 100644
--- a/c/util.h
+++ b/c/util.h
@@ -10,6 +10,15 @@
#define CONCAT(a, b) CONCAT_IMPL(a, b)
#define _ CONCAT(unused_, __LINE__)
+#define SET_TERMINATE \
+ std::set_terminate([]() noexcept \
+ { \
+ ShowException( \
+ L"Episode Browser was terminated due to an error: %s", \
+ L"Fatal Error", MB_ICONERROR); \
+ _Exit(1); \
+ })
+
template <typename F>
struct Finally
{