diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2012-02-16 06:15:29 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2012-02-16 06:15:29 -0800 |
commit | d7ba2b97d8c03bf47c25978d96fa055e7d11ba5a (patch) | |
tree | 0aac9cbd9651ea3f7044e39a1eb03c14b425bba1 | |
parent | ecc500b1b343a8fc087236cc0b22a25322b6852e (diff) | |
download | txr-d7ba2b97d8c03bf47c25978d96fa055e7d11ba5a.tar.gz txr-d7ba2b97d8c03bf47c25978d96fa055e7d11ba5a.tar.bz2 txr-d7ba2b97d8c03bf47c25978d96fa055e7d11ba5a.zip |
* eval.c (op_catch): Treat the nil exception object as an empty
list, and not the atom nil.
* match.c (v_try): Do not transform an atomic exception x into
the list ((t . x)). Just to (x). This (t . x) representation is
a vestige of from the time when the exception consisted of the
old-style return values from txeval.
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | eval.c | 2 | ||||
-rw-r--r-- | match.c | 2 |
3 files changed, 12 insertions, 2 deletions
@@ -1,5 +1,15 @@ 2012-02-16 Kaz Kylheku <kaz@kylheku.com> + * eval.c (op_catch): Treat the nil exception object as an empty + list, and not the atom nil. + + * match.c (v_try): Do not transform an atomic exception x into + the list ((t . x)). Just to (x). This (t . x) representation is + a vestige of from the time when the exception consisted of the + old-style return values from txeval. + +2012-02-16 Kaz Kylheku <kaz@kylheku.com> + TXR Lisp gets exception handling. * eval.c (op_catch, expand_catch_clause, @@ -1094,7 +1094,7 @@ static val op_catch(val form, val env) if (uw_exception_subtype_p(exsym, type)) { val params = second(clause); - val clause_env = bind_args(env, params, if3(consp(exvals), + val clause_env = bind_args(env, params, if3(listp(exvals), exvals, cons(exvals, nil)), clause); result = eval_progn(rest(rest(clause)), clause_env, clause); @@ -3033,7 +3033,7 @@ static val v_try(match_files_ctx *c) val body = third(clause); val vals = if3(listp(exvals), exvals, - cons(cons(t, exvals), nil)); + cons(exvals, nil)); if (first(clause) == catch_s) { if (uw_exception_subtype_p(exsym, type)) { |