summaryrefslogtreecommitdiffstatshomepage
path: root/unix/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix/main.c')
-rw-r--r--unix/main.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/unix/main.c b/unix/main.c
index 35fca2059a..b39ed4f2c7 100644
--- a/unix/main.c
+++ b/unix/main.c
@@ -73,15 +73,7 @@ static void execute_from_lexer(mp_lexer_t *lex, mp_parse_input_kind_t input_kind
nlr_pop();
} else {
// uncaught exception
- mp_obj_t exc = (mp_obj_t)nlr.ret_val;
- if (MP_OBJ_IS_TYPE(exc, &exception_type)) {
- qstr file, block;
- machine_uint_t line;
- mp_obj_exception_get_source_info(exc, &file, &line, &block);
- printf("File \"%s\", line %d, in %s\n", qstr_str(file), (int)line, qstr_str(block));
- }
- mp_obj_print(exc, PRINT_REPR);
- printf("\n");
+ mp_obj_print_exception((mp_obj_t)nlr.ret_val);
}
}