improve error messages of load function

This commit is contained in:
Yuichi Nishiwaki 2014-06-25 18:18:01 +09:00
parent a90330d3d9
commit 1440a51ef8
1 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ pic_load_cstr(pic_state *pic, const char *src)
exprs = pic_parse_cstr(pic, src);
if (pic_undef_p(exprs)) {
pic_error(pic, "load: unexpected EOF");
pic_errorf(pic, "load: read failure (%s)", pic_errmsg(pic));
}
pic_for_each (v, exprs) {
@ -48,7 +48,7 @@ pic_load(pic_state *pic, const char *fn)
exprs = pic_parse_file(pic, file);
if (pic_undef_p(exprs)) {
pic_error(pic, "load: unexpected EOF");
pic_errorf(pic, "load: read failure (%s)", pic_errmsg(pic));
}
pic_for_each (v, exprs) {