builtinimport: If there was error compiling imported module, raise exception.
This commit is contained in:
parent
fa6f0506c1
commit
20e9ed3916
@ -122,7 +122,7 @@ void do_load(mp_obj_t module_obj, vstr_t *file) {
|
|||||||
// TODO handle compile error correctly
|
// TODO handle compile error correctly
|
||||||
mp_locals_set(old_locals);
|
mp_locals_set(old_locals);
|
||||||
mp_globals_set(old_globals);
|
mp_globals_set(old_globals);
|
||||||
return;
|
nlr_raise(mp_obj_new_exception_msg(&mp_type_SyntaxError, "Syntax error in imported module"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// complied successfully, execute it
|
// complied successfully, execute it
|
||||||
|
Loading…
Reference in New Issue
Block a user