diff options
Diffstat (limited to 'py/obj.c')
-rw-r--r-- | py/obj.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -57,7 +57,11 @@ void mp_obj_print_exception(mp_obj_t exc) { if (n > 0) { printf("Traceback (most recent call last):\n"); for (int i = n - 3; i >= 0; i -= 3) { +#if MICROPY_ENABLE_SOURCE_LINE printf(" File \"%s\", line %d, in %s\n", qstr_str(values[i]), (int)values[i + 1], qstr_str(values[i + 2])); +#else + printf(" File \"%s\", in %s\n", qstr_str(values[i]), qstr_str(values[i + 2])); +#endif } } } |