summaryrefslogtreecommitdiffstats
path: root/source/slang/diagnostics.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/diagnostics.h')
-rw-r--r--source/slang/diagnostics.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/slang/diagnostics.h b/source/slang/diagnostics.h
index 6957fc763..988cb742b 100644
--- a/source/slang/diagnostics.h
+++ b/source/slang/diagnostics.h
@@ -206,7 +206,7 @@ namespace Slang
#define SLANG_UNIMPLEMENTED(sink, pos, what) \
(sink)->diagnose(Slang::CodePosition(__LINE__, 0, 0, __FILE__), Slang::Diagnostics::unimplemented, what)
-#define SLANG_UNREACHABLE(msg) do { assert(!"ureachable code:" msg); exit(1); } while(0)
+#define SLANG_UNREACHABLE(msg) do { assert(!"ureachable code:" msg); throw 0; } while(0)
#else
#define SLANG_INTERNAL_ERROR(sink, pos) \
(sink)->diagnose(pos, Slang::Diagnostics::internalCompilerError)