We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c783666 commit 930ff2bCopy full SHA for 930ff2b
tpde/src/base.cpp
@@ -4,12 +4,17 @@
4
#include "tpde/base.hpp"
5
6
#include <cstdlib>
7
+#include <stdexcept>
8
9
namespace tpde {
10
11
[[noreturn]] void fatal_error([[maybe_unused]] const char *msg) {
12
TPDE_LOG_ERR("TPDE FATAL ERROR: {}", msg);
13
+#ifdef __cpp_exceptions
14
+ throw std::runtime_error(msg);
15
+#else
16
abort();
17
+#endif
18
}
19
20
} // end namespace tpde
0 commit comments