summaryrefslogtreecommitdiff
path: root/libguile/error.c
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-06-04 00:29:59 +0200
committerLudovic Courtès <ludo@gnu.org>2013-06-04 12:08:02 +0200
commit4af0d97ee65f298be33d5959cd36a5bea8797be9 (patch)
tree863824da077e6800145db2b8f3cc10c3c551ce9a /libguile/error.c
parent6fe2803b45fbbd676625c9d665151e5a8a57aca5 (diff)
downloadguile-4af0d97ee65f298be33d5959cd36a5bea8797be9.tar.gz
Print the faulty object upon invalid-keyword errors.
* libguile/vm.c (vm_error_kwargs_invalid_keyword, vm_error_kwargs_unrecognized_keyword): Add parameter. Pass it enclosed in a list as the last argument to `scm_error_scm'. * libguile/vm-i-system.c (bind_kwargs): Adjust accordingly. * libguile/eval.c (error_invalid_keyword, error_unrecognized_keyword): Add parameter. (prepare_boot_closure_env_for_apply): Adjust accordingly. * module/ice-9/eval.scm (primitive-eval): Likewise. * libguile/error.c (scm_error_scm): Mention `keyword-argument-error' in docstring. * module/ice-9/boot-9.scm (keyword-error-printer): New procedure; use it. * test-suite/tests/optargs.test (c&e, with-test-prefix/c&e): Remove. ("define*")["unrecognized keyword"]: Test the value passed along the `keyword-argument-error' exception. ["invalid keyword"]: New test. * doc/ref/api-control.texi (Error Reporting): Update `scm-error' description.
Diffstat (limited to 'libguile/error.c')
-rw-r--r--libguile/error.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libguile/error.c b/libguile/error.c
index 0df4c737e..26cf5b6d6 100644
--- a/libguile/error.c
+++ b/libguile/error.c
@@ -80,7 +80,8 @@ SCM_DEFINE (scm_error_scm, "scm-error", 5, 0, 0,
"@code{system-error} then it should be a list containing the\n"
"Unix @code{errno} value; If @var{key} is @code{signal} then it\n"
"should be a list containing the Unix signal number; If\n"
- "@var{key} is @code{out-of-range} or @code{wrong-type-arg},\n"
+ "@var{key} is @code{out-of-range}, @code{wrong-type-arg},\n"
+ "or @code{keyword-argument-error}, "
"it is a list containing the bad value; otherwise\n"
"it will usually be @code{#f}.")
#define FUNC_NAME s_scm_error_scm