From 9d2a2d227c2a6782391bb5e2300e8bc0ae6e5a6f Mon Sep 17 00:00:00 2001 From: Glenn Ruben Bakke Date: Tue, 7 Mar 2017 17:53:10 +0100 Subject: [PATCH] nrf5: Updated after merge with master. Updating nlr_jump_fail to call __fatal_error in order to provide a non-returning function call. --- nrf5/main.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/nrf5/main.c b/nrf5/main.c index e5b0f51705..8d0219a467 100644 --- a/nrf5/main.c +++ b/nrf5/main.c @@ -233,14 +233,16 @@ void HardFault_Handler(void) #endif } - -void nlr_jump_fail(void *val) { -} - void NORETURN __fatal_error(const char *msg) { while (1); } +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(""); +} + void MP_WEAK __assert_func(const char *file, int line, const char *func, const char *expr) { printf("Assertion '%s' failed, at file %s:%d\n", expr, file, line); __fatal_error("Assertion failed");