summaryrefslogtreecommitdiffstats
path: root/unwind.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-11-26 20:01:35 -0800
committerKaz Kylheku <kaz@kylheku.com>2016-11-26 20:01:35 -0800
commit7a3baf9fa0107f2c0bc35be987f98fd9875a636c (patch)
treebf3eb97448cc532d66a2f647de30b56a9d14772e /unwind.c
parent54256c89eec80c2a909416dc86c1cc9e0ed0c046 (diff)
downloadtxr-7a3baf9fa0107f2c0bc35be987f98fd9875a636c.tar.gz
txr-7a3baf9fa0107f2c0bc35be987f98fd9875a636c.tar.bz2
txr-7a3baf9fa0107f2c0bc35be987f98fd9875a636c.zip
New function to access exception subtype map.
* uwind.c (exception_subtype_map): New static function. (uw_late_init): Register exception-subtype-map intrinsic function. * txr.1: Exception types are described in more detail. A complete diagram of the existing hierarchyis given, and the exception-subtype-map funtion is documented.
Diffstat (limited to 'unwind.c')
-rw-r--r--unwind.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/unwind.c b/unwind.c
index a993e7cf..946db162 100644
--- a/unwind.c
+++ b/unwind.c
@@ -714,6 +714,11 @@ static val me_defex(val form, val menv)
mapcar(curry_12_2(list_f, quote_s), types));
}
+static val exception_subtype_map(void)
+{
+ return exception_subtypes;
+}
+
void uw_continue(uw_frame_t *cont)
{
uw_exit_point = cont;
@@ -972,6 +977,7 @@ void uw_late_init(void)
func_n0v(register_exception_subtypes));
reg_fun(intern(lit("exception-subtype-p"), user_package),
func_n2(uw_exception_subtype_p));
+ reg_fun(intern(lit("exception-subtype-map"), user_package), func_n0(exception_subtype_map));
reg_fun(intern(lit("get-frames"), user_package), func_n0(uw_get_frames));
reg_fun(intern(lit("find-frame"), user_package), func_n2o(uw_find_frame, 0));
reg_fun(intern(lit("invoke-catch"), user_package),