Lines Matching refs:exception

90 void zend_exception_set_previous(zend_object *exception, zend_object *add_previous) /* {{{ */  in zend_exception_set_previous()  argument
96 if (!exception || !add_previous) { in zend_exception_set_previous()
100 …if (exception == add_previous || zend_is_unwind_exit(add_previous) || zend_is_graceful_exit(add_pr… in zend_exception_set_previous()
109 ZVAL_OBJ(&zv, exception); in zend_exception_set_previous()
135 zend_exception_set_previous(EG(exception), EG(prev_exception)); in zend_exception_save()
137 if (EG(exception)) { in zend_exception_save()
138 EG(prev_exception) = EG(exception); in zend_exception_save()
140 EG(exception) = NULL; in zend_exception_save()
147 if (EG(exception)) { in zend_exception_restore()
148 zend_exception_set_previous(EG(exception), EG(prev_exception)); in zend_exception_restore()
150 EG(exception) = EG(prev_exception); in zend_exception_restore()
165 ZEND_API ZEND_COLD void zend_throw_exception_internal(zend_object *exception) /* {{{ */ in zend_throw_exception_internal() argument
169 if (exception != NULL) { in zend_throw_exception_internal()
170 DTRACE_EXCEPTION_THROWN(ZSTR_VAL(exception->ce->name)); in zend_throw_exception_internal()
177 if (exception != NULL) { in zend_throw_exception_internal()
178 zend_object *previous = EG(exception); in zend_throw_exception_internal()
181 OBJ_RELEASE(exception); in zend_throw_exception_internal()
185 zend_exception_set_previous(exception, EG(exception)); in zend_throw_exception_internal()
186 EG(exception) = exception; in zend_throw_exception_internal()
193 …if (exception && (exception->ce == zend_ce_parse_error || exception->ce == zend_ce_compile_error))… in zend_throw_exception_internal()
196 if (EG(exception)) { in zend_throw_exception_internal()
197 zend_exception_error(EG(exception), E_ERROR); in zend_throw_exception_internal()
204 zend_throw_exception_hook(exception); in zend_throw_exception_internal()
218 zend_object *exception; in zend_clear_exception() local
223 if (!EG(exception)) { in zend_clear_exception()
227 exception = EG(exception); in zend_clear_exception()
228 EG(exception) = NULL; in zend_clear_exception()
229 OBJ_RELEASE(exception); in zend_clear_exception()
624 if (EG(exception)) { in ZEND_METHOD()
647 zval trace, *exception; in ZEND_METHOD() local
658 exception = ZEND_THIS; in ZEND_METHOD()
661 …while (exception && Z_TYPE_P(exception) == IS_OBJECT && instanceof_function(Z_OBJCE_P(exception), … in ZEND_METHOD()
663 zend_string *message = zval_get_string(GET_PROPERTY(exception, ZEND_STR_MESSAGE)); in ZEND_METHOD()
664 zend_string *file = zval_get_string(GET_PROPERTY(exception, ZEND_STR_FILE)); in ZEND_METHOD()
665 zend_long line = zval_get_long(GET_PROPERTY(exception, ZEND_STR_LINE)); in ZEND_METHOD()
669 fci.object = Z_OBJ_P(exception); in ZEND_METHOD()
682 …if ((Z_OBJCE_P(exception) == zend_ce_type_error || Z_OBJCE_P(exception) == zend_ce_argument_count_… in ZEND_METHOD()
695 ZVAL_STR(&name_zv, Z_OBJCE_P(exception)->name); in ZEND_METHOD()
719 Z_PROTECT_RECURSION_P(exception); in ZEND_METHOD()
720 exception = GET_PROPERTY(exception, ZEND_STR_PREVIOUS); in ZEND_METHOD()
721 if (exception && Z_TYPE_P(exception) == IS_OBJECT && Z_IS_RECURSIVE_P(exception)) { in ZEND_METHOD()
727 exception = ZEND_THIS; in ZEND_METHOD()
729 …le (exception && Z_TYPE_P(exception) == IS_OBJECT && (base_ce = i_get_exception_base(Z_OBJ_P(excep… in ZEND_METHOD()
730 if (Z_IS_RECURSIVE_P(exception)) { in ZEND_METHOD()
731 Z_UNPROTECT_RECURSION_P(exception); in ZEND_METHOD()
735 exception = GET_PROPERTY(exception, ZEND_STR_PREVIOUS); in ZEND_METHOD()
738 exception = ZEND_THIS; in ZEND_METHOD()
739 base_ce = i_get_exception_base(Z_OBJ_P(exception)); in ZEND_METHOD()
744 zend_update_property_ex(base_ce, Z_OBJ_P(exception), ZSTR_KNOWN(ZEND_STR_STRING), &tmp); in ZEND_METHOD()
897 zval exception, rv; in zend_exception_error() local
901 ZVAL_OBJ(&exception, ex); in zend_exception_error()
903 EG(exception) = NULL; in zend_exception_error()
905 zend_string *message = zval_get_string(GET_PROPERTY(&exception, ZEND_STR_MESSAGE)); in zend_exception_error()
906 zend_string *file = zval_get_string(GET_PROPERTY_SILENT(&exception, ZEND_STR_FILE)); in zend_exception_error()
907 zend_long line = zval_get_long(GET_PROPERTY_SILENT(&exception, ZEND_STR_LINE)); in zend_exception_error()
921 if (!EG(exception)) { in zend_exception_error()
930 if (EG(exception)) { in zend_exception_error()
933 ZVAL_OBJ(&zv, EG(exception)); in zend_exception_error()
949 str = zval_get_string(GET_PROPERTY_SILENT(&exception, ZEND_STR_STRING)); in zend_exception_error()
950 file = zval_get_string(GET_PROPERTY_SILENT(&exception, ZEND_STR_FILE)); in zend_exception_error()
951 line = zval_get_long(GET_PROPERTY_SILENT(&exception, ZEND_STR_LINE)); in zend_exception_error()
977 ZEND_ASSERT(EG(exception)); in zend_exception_uncaught_error()
979 ZVAL_OBJ_COPY(&exception_zv, EG(exception)); in zend_exception_uncaught_error()
987 ZEND_API ZEND_COLD void zend_throw_exception_object(zval *exception) /* {{{ */ in zend_throw_exception_object() argument
989 if (exception == NULL || Z_TYPE_P(exception) != IS_OBJECT) { in zend_throw_exception_object()
993 zend_class_entry *exception_ce = Z_OBJCE_P(exception); in zend_throw_exception_object()
997 zval_ptr_dtor(exception); in zend_throw_exception_object()
1001 zend_throw_exception_internal(Z_OBJ_P(exception)); in zend_throw_exception_object()
1017 ZEND_ASSERT(!EG(exception)); in zend_throw_unwind_exit()
1018 EG(exception) = zend_create_unwind_exit(); in zend_throw_unwind_exit()
1025 ZEND_ASSERT(!EG(exception)); in zend_throw_graceful_exit()
1026 EG(exception) = zend_create_graceful_exit(); in zend_throw_graceful_exit()