File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,9 @@ STATIC int parse_compile_execute(const void *source, mp_parse_input_kind_t input
7979 nlr_buf_t nlr ;
8080 nlr .ret_val = NULL ;
8181 if (nlr_push (& nlr ) == 0 ) {
82+ #if MICROPY_SCHED_VM_ABORT
83+ nlr_set_abort (& nlr );
84+ #endif
8285 mp_obj_t module_fun ;
8386 #if MICROPY_MODULE_FROZEN_MPY
8487 if (exec_flags & EXEC_FLAG_SOURCE_IS_RAW_CODE ) {
@@ -140,7 +143,12 @@ STATIC int parse_compile_execute(const void *source, mp_parse_input_kind_t input
140143 mp_hal_stdout_tx_strn ("\x04" , 1 );
141144 }
142145
143- // check for SystemExit
146+ #if MICROPY_SCHED_VM_ABORT
147+ if (nlr .ret_val == NULL ) {
148+ // VM abort
149+ ret = PYEXEC_FORCED_EXIT ;
150+ } else
151+ #endif
144152 if (mp_obj_is_subclass_fast (MP_OBJ_FROM_PTR (((mp_obj_base_t * )nlr .ret_val )-> type ), MP_OBJ_FROM_PTR (& mp_type_SystemExit ))) {
145153 // at the moment, the value of SystemExit is unused
146154 ret = pyexec_system_exit ;
You can’t perform that action at this time.
0 commit comments