From 7a3baf9fa0107f2c0bc35be987f98fd9875a636c Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sat, 26 Nov 2016 20:01:35 -0800 Subject: 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. --- unwind.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'unwind.c') 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), -- cgit v1.2.3