summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDave Hylands <dhylands@gmail.com>2015-12-05 23:34:23 -0800
committerDamien George <damien.p.george@gmail.com>2015-12-07 17:21:51 +0000
commitf380904bd9376216f9bf06bcdc354f6b5800c896 (patch)
treedc1358d7c9b10c7cc49d1142af8824572767795a
parent36c6d2fa7dd01886e7fa781fb47f9cc4201ad115 (diff)
downloadmicropython-f380904bd9376216f9bf06bcdc354f6b5800c896.tar.gz
micropython-f380904bd9376216f9bf06bcdc354f6b5800c896.zip
stmhal: Print exception information in nlr_jump_failed
Currently nlr_jump_fail prints that there was an uncaught exception but nothing about the exception. This patch causes nlr_jump_failed to try to print the exception. Given that printf was called on the line above, I think that the call to mp_obj_print_exception has about as much likelyhood of succeeding as the printf does.
-rw-r--r--stmhal/main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/stmhal/main.c b/stmhal/main.c
index 733d3a19b4..cce114605a 100644
--- a/stmhal/main.c
+++ b/stmhal/main.c
@@ -103,6 +103,7 @@ void NORETURN __fatal_error(const char *msg) {
void nlr_jump_fail(void *val) {
printf("FATAL: uncaught exception %p\n", val);
+ mp_obj_print_exception(&mp_plat_print, (mp_obj_t)val);
__fatal_error("");
}