summaryrefslogtreecommitdiffstats
path: root/unwind.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-05-07 18:19:31 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-05-07 18:19:31 -0700
commit7a3280106d04624a00bddb5abdf74485b9d0dee7 (patch)
tree46769937aa27c60cbfa1164c709ee06406e00978 /unwind.c
parent8f1e467559024433853e6ec0a862752c9a546104 (diff)
downloadtxr-7a3280106d04624a00bddb5abdf74485b9d0dee7.tar.gz
txr-7a3280106d04624a00bddb5abdf74485b9d0dee7.tar.bz2
txr-7a3280106d04624a00bddb5abdf74485b9d0dee7.zip
Adding panic macro, which throws a panic exception.
* lib.c (panic_s): New symbol variable. (obj_init): Initialize panic_s. * lib.h (panic_s): Declared. * unwind.c (uw_init): Register panic exception. * unwind.h (panic): New macro.
Diffstat (limited to 'unwind.c')
-rw-r--r--unwind.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/unwind.c b/unwind.c
index 7495be1e..9e0de39e 100644
--- a/unwind.c
+++ b/unwind.c
@@ -903,6 +903,7 @@ void uw_init(void)
exception_subtypes = cons(cons(t, nil), exception_subtypes);
uw_register_subtype(type_error_s, error_s);
uw_register_subtype(internal_error_s, error_s);
+ uw_register_subtype(panic_s, error_s);
uw_register_subtype(numeric_error_s, error_s);
uw_register_subtype(range_error_s, error_s);
uw_register_subtype(query_error_s, error_s);