summaryrefslogtreecommitdiffstats
path: root/unwind.h
diff options
context:
space:
mode:
Diffstat (limited to 'unwind.h')
-rw-r--r--unwind.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/unwind.h b/unwind.h
index fb353b15..615433e3 100644
--- a/unwind.h
+++ b/unwind.h
@@ -235,6 +235,16 @@ noreturn val type_mismatch(val, ...);
nao); \
} while (0)
+#define panic(STR) \
+ do { \
+ extern obj_t *num(cnum); \
+ uw_throwf(panic_s, \
+ lit("~a:~a ~a"), \
+ lit(__FILE__), \
+ num(__LINE__), lit(STR), \
+ nao); \
+ } while (0)
+
#define type_assert(EXPR, ARGS) \
if (!(EXPR)) type_mismatch ARGS