mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-23 20:05:32 +02:00
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.
This commit is contained in:
parent
6fe2803b45
commit
4af0d97ee6
8 changed files with 41 additions and 42 deletions
|
@ -1421,7 +1421,8 @@ Guile) formats using @code{display} and @code{~S} (was
|
|||
@code{system-error} then it should be a list containing the
|
||||
Unix @code{errno} value; If @var{key} is @code{signal} then it
|
||||
should be a list containing the Unix signal number; If
|
||||
@var{key} is @code{out-of-range} or @code{wrong-type-arg},
|
||||
@var{key} is @code{out-of-range}, @code{wrong-type-arg},
|
||||
or @code{keyword-argument-error},
|
||||
it is a list containing the bad value; otherwise
|
||||
it will usually be @code{#f}.
|
||||
@end deffn
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue