1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-14 15:40:19 +02:00

better unbound variable errors in the vm

* libguile/vm-i-system.c (variable-ref, toplevel-ref)
  (long-toplevel-ref): Fixup callers.

* libguile/vm-engine.c (vm_error_unbound): Don't use vm-error for
  unbound vars, use misc-error. Don't include VM: in the string. Take
  the name directly in finish_args, not as a list.
This commit is contained in:
Andy Wingo 2010-12-07 12:26:07 +01:00
parent 1f845305c1
commit d107921794
2 changed files with 8 additions and 6 deletions

View file

@ -139,9 +139,11 @@ VM_NAME (SCM vm, SCM program, SCM *argv, int nargs)
goto vm_error;
vm_error_unbound:
/* At this point FINISH_ARGS should be a one-element list containing
the name of the unbound variable. */
err_msg = scm_from_locale_string ("VM: Unbound variable: ~s");
/* FINISH_ARGS should be the name of the unbound variable. */
SYNC_ALL ();
err_msg = scm_from_locale_string ("Unbound variable: ~s");
scm_error_scm (scm_misc_error_key, program, err_msg,
scm_list_1 (finish_args), SCM_BOOL_F);
goto vm_error;
vm_error_apply_to_non_list: