mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-15 17:07:34 +02:00
Better error message when trying to use -R on an unknown module.
This commit is contained in:
parent
536f9bfa90
commit
52de854b25
1 changed files with 5 additions and 0 deletions
5
main.c
5
main.c
|
@ -590,6 +590,11 @@ void run_main (int argc, char **argv) {
|
||||||
env = check_exception(ctx, sexp_eval_string(ctx, impmod, -1, sexp_meta_env(ctx)));
|
env = check_exception(ctx, sexp_eval_string(ctx, impmod, -1, sexp_meta_env(ctx)));
|
||||||
if (sexp_vectorp(env)) env = sexp_vector_ref(env, SEXP_ONE);
|
if (sexp_vectorp(env)) env = sexp_vector_ref(env, SEXP_ONE);
|
||||||
free(impmod);
|
free(impmod);
|
||||||
|
check_exception(ctx, env);
|
||||||
|
if (!sexp_envp(env)) {
|
||||||
|
fprintf(stderr, "couldn't find module: %s\n", main_module);
|
||||||
|
exit_failure();
|
||||||
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
if (i < argc && !no_script) { /* script usage */
|
if (i < argc && !no_script) { /* script usage */
|
||||||
|
|
Loading…
Add table
Reference in a new issue