File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -80,14 +80,15 @@ STATIC void *thread_entry(void *args_in) {
8080 } else {
8181 // uncaught exception
8282 // check for SystemExit
83- if (mp_obj_is_subclass_fast (mp_obj_get_type ((mp_obj_t )nlr .ret_val ), & mp_type_SystemExit )) {
83+ mp_obj_base_t * exc = (mp_obj_base_t * )nlr .ret_val ;
84+ if (mp_obj_is_subclass_fast (MP_OBJ_FROM_PTR (exc -> type ), MP_OBJ_FROM_PTR (& mp_type_SystemExit ))) {
8485 // swallow exception silently
8586 } else {
8687 // print exception out
8788 mp_printf (& mp_plat_print , "Unhandled exception in thread started by " );
8889 mp_obj_print_helper (& mp_plat_print , args -> fun , PRINT_REPR );
8990 mp_printf (& mp_plat_print , "\n" );
90- mp_obj_print_exception (& mp_plat_print , ( mp_obj_t ) nlr . ret_val );
91+ mp_obj_print_exception (& mp_plat_print , MP_OBJ_FROM_PTR ( exc ) );
9192 }
9293 }
9394
You can’t perform that action at this time.
0 commit comments