diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-11-29 09:40:08 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-11-29 09:40:08 -0800 |
commit | 25e4dce91bd88e97ba1620ad604fb98abff8a009 (patch) | |
tree | 020d58709560e57f00b540d8dfbe0de57d71cedf | |
parent | 24b5694c9fe7437322e09929527d98c7bee1408a (diff) | |
download | txr-25e4dce91bd88e97ba1620ad604fb98abff8a009.tar.gz txr-25e4dce91bd88e97ba1620ad604fb98abff8a009.tar.bz2 txr-25e4dce91bd88e97ba1620ad604fb98abff8a009.zip |
Improve destructuring error messages.
* eval.c (bind_macro_params): On mismatch between atom
and param list, or insufficient parameters for list, report
which params are mismatched. In a nested destructuring
syntax, it is difficult to know.
-rw-r--r-- | eval.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -920,14 +920,14 @@ static val bind_macro_params(val env, val menv, val params, val form, if (form) { if (loose_p == colon_k) goto nil_out; - eval_error(ctx_form, lit("~s: atom ~s not matched by parameter list"), - car(ctx_form), form, nao); + eval_error(ctx_form, lit("~s: atom ~s not matched by params ~s"), + car(ctx_form), form, params, nao); } if (!optargs) { if (!loose_p) - eval_error(ctx_form, lit("~s: insufficient number of arguments"), - car(ctx_form), nao); + eval_error(ctx_form, lit("~s: missing arguments for params ~s"), + car(ctx_form), params, nao); if (loose_p == colon_k) goto nil_out; } |