diff options
| author | Paul Sokolovsky | 2014-04-22 02:53:20 +0300 |
|---|---|---|
| committer | Paul Sokolovsky | 2014-04-22 02:53:20 +0300 |
| commit | 20e9ed3916bf0765f49aa6a922cbe061139341c0 (patch) | |
| tree | dac3f76694da4ea5fc724a1ad708f2744924bea3 /py | |
| parent | fa6f0506c1380d0d96ca7bb5d30d89259a235102 (diff) | |
builtinimport: If there was error compiling imported module, raise exception.
Diffstat (limited to 'py')
| -rw-r--r-- | py/builtinimport.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/builtinimport.c b/py/builtinimport.c index 4a2f6510c..07978e61d 100644 --- a/py/builtinimport.c +++ b/py/builtinimport.c @@ -122,7 +122,7 @@ void do_load(mp_obj_t module_obj, vstr_t *file) { // TODO handle compile error correctly mp_locals_set(old_locals); 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 |
