Error handling on failing set!.
* mes.c (set_env_x): Produce error message [WAS: dump core].
This commit is contained in:
parent
3b4e9f36c8
commit
2cad00527e
10
mes.c
10
mes.c
|
@ -194,7 +194,15 @@ scm *
|
|||
set_env_x (scm *x, scm *e, scm *a)
|
||||
{
|
||||
cache_invalidate (x);
|
||||
return set_cdr_x (assq (x, a), e);
|
||||
scm *p = assq (x, a);
|
||||
if (p->type != PAIR)
|
||||
{
|
||||
fprintf (stderr, "set!: unbound variable:");
|
||||
display_ (stderr, x);
|
||||
fprintf (stderr, "\n");
|
||||
assert (!"unbound variable");
|
||||
}
|
||||
return set_cdr_x (p, e);
|
||||
}
|
||||
|
||||
scm *
|
||||
|
|
Loading…
Reference in New Issue