show codegen error message when compilation failure

This commit is contained in:
Yuichi Nishiwaki 2013-10-29 02:33:22 +09:00
parent 1d9410638d
commit 9424f0b9c0
2 changed files with 2 additions and 0 deletions

View File

@ -34,6 +34,7 @@ pic_load_stdlib(pic_state *pic)
proc = pic_codegen(pic, v);
if (proc == NULL) {
fputs(pic->errmsg, stderr);
fputs("fatal error: built-in.scm compilation failure", stderr);
abort();
}

View File

@ -171,6 +171,7 @@ exec_file(pic_state *pic, const char *fname)
proc = pic_codegen(pic, v);
if (proc == NULL) {
fputs(pic->errmsg, stderr);
fprintf(stderr, "fatal error: %s compilation failure\n", fname);
return 1;
}