@@ -43,11 +43,11 @@ ZEND_API zend_class_entry *zend_ce_arithmetic_error;
43
43
ZEND_API zend_class_entry * zend_ce_division_by_zero_error ;
44
44
ZEND_API zend_class_entry * zend_ce_unhandled_match_error ;
45
45
46
- /* Internal pseudo-exception that is not exposed to userland. */
46
+ /* Internal pseudo-exception that is not exposed to userland. Throwing this exception *does not* execute finally blocks. */
47
47
static zend_class_entry zend_ce_unwind_exit ;
48
48
49
- /* Internal pseudo-exception used in destroyed fibers that is not exposed to userland. */
50
- static zend_class_entry zend_ce_fiber_exit ;
49
+ /* Internal pseudo-exception that is not exposed to userland. Throwing this exception *does* execute finally blocks . */
50
+ static zend_class_entry zend_ce_graceful_exit ;
51
51
52
52
ZEND_API void (* zend_throw_exception_hook )(zend_object * ex );
53
53
@@ -97,7 +97,7 @@ void zend_exception_set_previous(zend_object *exception, zend_object *add_previo
97
97
return ;
98
98
}
99
99
100
- if (exception == add_previous || zend_is_unwind_exit (add_previous ) || zend_is_fiber_exit (add_previous )) {
100
+ if (exception == add_previous || zend_is_unwind_exit (add_previous ) || zend_is_graceful_exit (add_previous )) {
101
101
OBJ_RELEASE (add_previous );
102
102
return ;
103
103
}
@@ -795,7 +795,7 @@ void zend_register_default_exception(void) /* {{{ */
795
795
796
796
INIT_CLASS_ENTRY (zend_ce_unwind_exit , "UnwindExit" , NULL );
797
797
798
- INIT_CLASS_ENTRY (zend_ce_fiber_exit , "FiberExit " , NULL );
798
+ INIT_CLASS_ENTRY (zend_ce_graceful_exit , "GracefulExit " , NULL );
799
799
}
800
800
/* }}} */
801
801
@@ -954,7 +954,7 @@ ZEND_API ZEND_COLD zend_result zend_exception_error(zend_object *ex, int severit
954
954
955
955
zend_string_release_ex (str , 0 );
956
956
zend_string_release_ex (file , 0 );
957
- } else if (ce_exception == & zend_ce_unwind_exit ) {
957
+ } else if (ce_exception == & zend_ce_unwind_exit || ce_exception == & zend_ce_graceful_exit ) {
958
958
/* We successfully unwound, nothing more to do.
959
959
* We still return FAILURE in this case, as further execution should still be aborted. */
960
960
} else {
@@ -992,10 +992,10 @@ ZEND_API ZEND_COLD void zend_throw_unwind_exit(void)
992
992
EG (current_execute_data )-> opline = EG (exception_op );
993
993
}
994
994
995
- ZEND_API ZEND_COLD void zend_throw_fiber_exit (void )
995
+ ZEND_API ZEND_COLD void zend_throw_graceful_exit (void )
996
996
{
997
997
ZEND_ASSERT (!EG (exception ));
998
- EG (exception ) = zend_objects_new (& zend_ce_fiber_exit );
998
+ EG (exception ) = zend_objects_new (& zend_ce_graceful_exit );
999
999
EG (opline_before_exception ) = EG (current_execute_data )-> opline ;
1000
1000
EG (current_execute_data )-> opline = EG (exception_op );
1001
1001
}
@@ -1005,7 +1005,7 @@ ZEND_API bool zend_is_unwind_exit(const zend_object *ex)
1005
1005
return ex -> ce == & zend_ce_unwind_exit ;
1006
1006
}
1007
1007
1008
- ZEND_API bool zend_is_fiber_exit (const zend_object * ex )
1008
+ ZEND_API bool zend_is_graceful_exit (const zend_object * ex )
1009
1009
{
1010
- return ex -> ce == & zend_ce_fiber_exit ;
1010
+ return ex -> ce == & zend_ce_graceful_exit ;
1011
1011
}
0 commit comments