mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
checking for NULLs before checking exceptions
This commit is contained in:
parent
0f723c17ea
commit
7c1c40fb07
2 changed files with 2 additions and 2 deletions
2
eval.c
2
eval.c
|
@ -51,7 +51,7 @@ void sexp_warn (sexp ctx, char *msg, sexp x) {
|
|||
}
|
||||
|
||||
sexp sexp_warn_undefs_op (sexp ctx, sexp self, sexp_sint_t n, sexp from, sexp to, sexp res) {
|
||||
sexp x, ignore = sexp_exceptionp(res) ? sexp_exception_irritants(res) : SEXP_NULL;
|
||||
sexp x, ignore = (res && sexp_exceptionp(res)) ? sexp_exception_irritants(res) : SEXP_NULL;
|
||||
if (sexp_envp(from)) from = sexp_env_bindings(from);
|
||||
for (x=from; sexp_pairp(x) && x!=to; x=sexp_env_next_cell(x))
|
||||
if (sexp_cdr(x) == SEXP_UNDEF && sexp_car(x) != ignore
|
||||
|
|
2
main.c
2
main.c
|
@ -205,7 +205,7 @@ static void repl (sexp ctx, sexp env) {
|
|||
#if SEXP_USE_WARN_UNDEFS
|
||||
sexp_warn_undefs(ctx, sexp_env_bindings(env), tmp, res);
|
||||
#endif
|
||||
if (sexp_exceptionp(res)) {
|
||||
if (res && sexp_exceptionp(res)) {
|
||||
sexp_print_exception(ctx, res, err);
|
||||
sexp_stack_trace(ctx, err);
|
||||
} else if (res != SEXP_VOID) {
|
||||
|
|
Loading…
Add table
Reference in a new issue