From 136b149e417314e5ad46b3ee78b811df57e74f41 Mon Sep 17 00:00:00 2001 From: Damien George Date: Sun, 19 Jan 2014 12:38:49 +0000 Subject: py: Add full traceback to exception printing. --- unix/main.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'unix/main.c') 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); } } -- cgit v1.2.3