From cbd2f7482c8bf457cc17da763859dbba6e03e2a2 Mon Sep 17 00:00:00 2001 From: Damien George Date: Sun, 19 Jan 2014 11:48:48 +0000 Subject: py: Add module/function/class name to exceptions. Exceptions know source file, line and block name. Also tidy up some debug printing functions and provide a global flag to enable/disable them. --- py/runtime.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'py/runtime.c') diff --git a/py/runtime.c b/py/runtime.c index fbcc983ab..e0d76a517 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -215,9 +215,8 @@ void rt_assign_byte_code(int unique_code_id, byte *code, uint len, int n_args, i DEBUG_printf(" %02x", code[i]); } DEBUG_printf("\n"); -#if MICROPY_SHOW_BC - extern void mp_show_byte_code(const byte *code, int len); - mp_show_byte_code(code, len); +#if MICROPY_DEBUG_PRINTERS + mp_byte_code_print(code, len); #endif #ifdef WRITE_CODE -- cgit v1.2.3