mirror of
https://github.com/micropython/micropython.git
synced 2026-01-04 11:10:14 +01:00
unix: Detect and print compile error.
This commit is contained in:
@@ -113,8 +113,9 @@ STATIC int execute_from_lexer(mp_lexer_t *lex, mp_parse_input_kind_t input_kind,
|
||||
|
||||
mp_obj_t module_fun = mp_compile(pn, source_name, emit_opt, is_repl);
|
||||
|
||||
if (module_fun == mp_const_none) {
|
||||
if (mp_obj_is_exception_instance(module_fun)) {
|
||||
// compile error
|
||||
mp_obj_print_exception(module_fun);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user