From 3542ea79acc5d239a296f8badea174ef8e59049c Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Tue, 26 Aug 2014 13:30:40 +0900 Subject: [PATCH] report errors when import_table raised an error --- lib.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib.c b/lib.c index 41202426..defb4b4b 100644 --- a/lib.c +++ b/lib.c @@ -132,7 +132,12 @@ import(pic_state *pic, pic_value spec) struct pic_dict *imports; xh_iter it; - imports = import_table(pic, spec); + pic_try { + imports = import_table(pic, spec); + } + pic_catch { + pic_errorf(pic, "syntax error around import statement: ~s", spec); + } xh_begin(&it, &imports->hash); while (xh_next(&it)) {