Lines Matching refs:exception

96 void zend_exception_set_previous(zend_object *exception, zend_object *add_previous) /* {{{ */  in zend_exception_set_previous()  argument
102 if (!exception || !add_previous) { in zend_exception_set_previous()
106 …if (exception == add_previous || zend_is_unwind_exit(add_previous) || zend_is_graceful_exit(add_pr… in zend_exception_set_previous()
115 ZVAL_OBJ(&zv, exception); in zend_exception_set_previous()
141 zend_exception_set_previous(EG(exception), EG(prev_exception)); in zend_exception_save()
143 if (EG(exception)) { in zend_exception_save()
144 EG(prev_exception) = EG(exception); in zend_exception_save()
146 EG(exception) = NULL; in zend_exception_save()
153 if (EG(exception)) { in zend_exception_restore()
154 zend_exception_set_previous(EG(exception), EG(prev_exception)); in zend_exception_restore()
156 EG(exception) = EG(prev_exception); in zend_exception_restore()
171 ZEND_API ZEND_COLD void zend_throw_exception_internal(zend_object *exception) /* {{{ */ in zend_throw_exception_internal() argument
175 if (exception != NULL) { in zend_throw_exception_internal()
176 DTRACE_EXCEPTION_THROWN(ZSTR_VAL(exception->ce->name)); in zend_throw_exception_internal()
183 if (exception != NULL) { in zend_throw_exception_internal()
184 zend_object *previous = EG(exception); in zend_throw_exception_internal()
187 OBJ_RELEASE(exception); in zend_throw_exception_internal()
191 zend_exception_set_previous(exception, EG(exception)); in zend_throw_exception_internal()
192 EG(exception) = exception; in zend_throw_exception_internal()
199 …if (exception && (exception->ce == zend_ce_parse_error || exception->ce == zend_ce_compile_error))… in zend_throw_exception_internal()
202 if (EG(exception)) { in zend_throw_exception_internal()
204 && !zend_is_unwind_exit(EG(exception)) in zend_throw_exception_internal()
205 && !zend_is_graceful_exit(EG(exception))) { in zend_throw_exception_internal()
207 if (EG(exception)) { in zend_throw_exception_internal()
208 zend_exception_error(EG(exception), E_ERROR); in zend_throw_exception_internal()
212 zend_exception_error(EG(exception), E_ERROR); in zend_throw_exception_internal()
220 zend_throw_exception_hook(exception); in zend_throw_exception_internal()
234 zend_object *exception; in zend_clear_exception() local
239 if (!EG(exception)) { in zend_clear_exception()
243 exception = EG(exception); in zend_clear_exception()
244 EG(exception) = NULL; in zend_clear_exception()
245 OBJ_RELEASE(exception); in zend_clear_exception()
626 if (EG(exception)) { in ZEND_METHOD()
649 zval trace, *exception; in ZEND_METHOD() local
660 exception = ZEND_THIS; in ZEND_METHOD()
663 …while (exception && Z_TYPE_P(exception) == IS_OBJECT && instanceof_function(Z_OBJCE_P(exception), … in ZEND_METHOD()
665 zend_string *message = zval_get_string(GET_PROPERTY(exception, ZEND_STR_MESSAGE)); in ZEND_METHOD()
666 zend_string *file = zval_get_string(GET_PROPERTY(exception, ZEND_STR_FILE)); in ZEND_METHOD()
667 zend_long line = zval_get_long(GET_PROPERTY(exception, ZEND_STR_LINE)); in ZEND_METHOD()
671 fci.object = Z_OBJ_P(exception); in ZEND_METHOD()
684 …if ((Z_OBJCE_P(exception) == zend_ce_type_error || Z_OBJCE_P(exception) == zend_ce_argument_count_… in ZEND_METHOD()
694 zend_string *name = Z_OBJCE_P(exception)->name; in ZEND_METHOD()
715 Z_PROTECT_RECURSION_P(exception); in ZEND_METHOD()
716 exception = GET_PROPERTY(exception, ZEND_STR_PREVIOUS); in ZEND_METHOD()
717 if (exception && Z_TYPE_P(exception) == IS_OBJECT && Z_IS_RECURSIVE_P(exception)) { in ZEND_METHOD()
723 exception = ZEND_THIS; in ZEND_METHOD()
725 …le (exception && Z_TYPE_P(exception) == IS_OBJECT && (base_ce = i_get_exception_base(Z_OBJ_P(excep… in ZEND_METHOD()
726 if (Z_IS_RECURSIVE_P(exception)) { in ZEND_METHOD()
727 Z_UNPROTECT_RECURSION_P(exception); in ZEND_METHOD()
731 exception = GET_PROPERTY(exception, ZEND_STR_PREVIOUS); in ZEND_METHOD()
734 exception = ZEND_THIS; in ZEND_METHOD()
735 base_ce = i_get_exception_base(Z_OBJ_P(exception)); in ZEND_METHOD()
740 zend_update_property_ex(base_ce, Z_OBJ_P(exception), ZSTR_KNOWN(ZEND_STR_STRING), &tmp); in ZEND_METHOD()
896 zval exception, rv; in zend_exception_error() local
900 ZVAL_OBJ(&exception, ex); in zend_exception_error()
902 EG(exception) = NULL; in zend_exception_error()
904 zend_string *message = zval_get_string(GET_PROPERTY(&exception, ZEND_STR_MESSAGE)); in zend_exception_error()
905 zend_string *file = zval_get_string(GET_PROPERTY_SILENT(&exception, ZEND_STR_FILE)); in zend_exception_error()
906 zend_long line = zval_get_long(GET_PROPERTY_SILENT(&exception, ZEND_STR_LINE)); in zend_exception_error()
920 if (!EG(exception)) { in zend_exception_error()
929 if (EG(exception)) { in zend_exception_error()
932 ZVAL_OBJ(&zv, EG(exception)); in zend_exception_error()
948 str = zval_get_string(GET_PROPERTY_SILENT(&exception, ZEND_STR_STRING)); in zend_exception_error()
949 file = zval_get_string(GET_PROPERTY_SILENT(&exception, ZEND_STR_FILE)); in zend_exception_error()
950 line = zval_get_long(GET_PROPERTY_SILENT(&exception, ZEND_STR_LINE)); in zend_exception_error()
976 ZEND_ASSERT(EG(exception)); in zend_exception_uncaught_error()
978 ZVAL_OBJ_COPY(&exception_zv, EG(exception)); in zend_exception_uncaught_error()
986 ZEND_API ZEND_COLD void zend_throw_exception_object(zval *exception) /* {{{ */ in zend_throw_exception_object() argument
988 if (exception == NULL || Z_TYPE_P(exception) != IS_OBJECT) { in zend_throw_exception_object()
992 zend_class_entry *exception_ce = Z_OBJCE_P(exception); in zend_throw_exception_object()
996 zval_ptr_dtor(exception); in zend_throw_exception_object()
1000 zend_throw_exception_internal(Z_OBJ_P(exception)); in zend_throw_exception_object()
1016 ZEND_ASSERT(!EG(exception)); in zend_throw_unwind_exit()
1017 EG(exception) = zend_create_unwind_exit(); in zend_throw_unwind_exit()
1024 ZEND_ASSERT(!EG(exception)); in zend_throw_graceful_exit()
1025 EG(exception) = zend_create_graceful_exit(); in zend_throw_graceful_exit()