summaryrefslogtreecommitdiffstats
path: root/src/Globals.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Globals.h')
-rw-r--r--src/Globals.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Globals.h b/src/Globals.h
index e48c6dbfe..e37f6dc60 100644
--- a/src/Globals.h
+++ b/src/Globals.h
@@ -352,6 +352,9 @@ template class SizeChecker<UInt8, 1>;
#define assert_test(x) ( !!(x) || (assert(!#x), exit(1), 0))
#endif
+/** Use to mark code that should be impossible to reach. */
+#define UNREACHABLE(x) do { FLOGERROR("Hit unreachable code: {0}, file {1}, line {2}", #x, __FILE__, __LINE__); PrintStackTrace(); std::terminate(); } while (false)
+