report errors when import_table raised an error
This commit is contained in:
parent
582cf626ea
commit
3542ea79ac
7
lib.c
7
lib.c
|
@ -132,7 +132,12 @@ import(pic_state *pic, pic_value spec)
|
||||||
struct pic_dict *imports;
|
struct pic_dict *imports;
|
||||||
xh_iter it;
|
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);
|
xh_begin(&it, &imports->hash);
|
||||||
while (xh_next(&it)) {
|
while (xh_next(&it)) {
|
||||||
|
|
Loading…
Reference in New Issue