Skip to content

Commit f380904

Browse files
dhylandsdpgeorge
authored andcommitted
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.
1 parent 36c6d2f commit f380904

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

stmhal/main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ void NORETURN __fatal_error(const char *msg) {
103103

104104
void nlr_jump_fail(void *val) {
105105
printf("FATAL: uncaught exception %p\n", val);
106+
mp_obj_print_exception(&mp_plat_print, (mp_obj_t)val);
106107
__fatal_error("");
107108
}
108109

0 commit comments

Comments
 (0)