summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-02-09 19:15:31 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-02-09 19:15:31 +0100
commitdcf86292ae3e828a334ebacdd0fc4f4c2599445f (patch)
treec8f9a59b6171f6e8013d9bc6369222b5152c71d7
parent31624b53db699f5ddcea1a48280c6d831c918ac1 (diff)
loader: show full exception msg on libstdc++
-rw-r--r--loader/init.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/loader/init.cpp b/loader/init.cpp
index 89d9d6c9..ee907675 100644
--- a/loader/init.cpp
+++ b/loader/init.cpp
@@ -13,9 +13,12 @@ extern "C" __declspec(dllimport) long WINAPI RtlGetVersion(PRTL_OSVERSIONINFOEXW
#if defined __GNUG__ && !defined __clang__
#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
#endif
-
#endif // _WIN32
+#ifdef __GLIBCXX__
+#include <exception>
+#endif
+
namespace floormat::loader_detail {
#ifdef _WIN32
@@ -37,6 +40,9 @@ static void system_init_()
if (check_windows_build_number(10, 0, 17035))
(void)::SetConsoleCP(CP_UTF8);
#endif
+#ifdef __GLIBCXX__
+ std::set_terminate(__gnu_cxx::__verbose_terminate_handler);
+#endif
}
void loader_impl::system_init()