Lines Matching refs:exception

80 void zend_exception_set_previous(zend_object *exception, zend_object *add_previous) /* {{{ */  in zend_exception_set_previous()  argument
86 if (!exception || !add_previous) { in zend_exception_set_previous()
90 if (exception == add_previous || zend_is_unwind_exit(add_previous)) { in zend_exception_set_previous()
99 ZVAL_OBJ(&zv, exception); in zend_exception_set_previous()
125 zend_exception_set_previous(EG(exception), EG(prev_exception)); in zend_exception_save()
127 if (EG(exception)) { in zend_exception_save()
128 EG(prev_exception) = EG(exception); in zend_exception_save()
130 EG(exception) = NULL; in zend_exception_save()
137 if (EG(exception)) { in zend_exception_restore()
138 zend_exception_set_previous(EG(exception), EG(prev_exception)); in zend_exception_restore()
140 EG(exception) = EG(prev_exception); in zend_exception_restore()
155 ZEND_API ZEND_COLD void zend_throw_exception_internal(zend_object *exception) /* {{{ */ in zend_throw_exception_internal() argument
159 if (exception != NULL) { in zend_throw_exception_internal()
160 DTRACE_EXCEPTION_THROWN(ZSTR_VAL(exception->ce->name)); in zend_throw_exception_internal()
167 if (exception != NULL) { in zend_throw_exception_internal()
168 zend_object *previous = EG(exception); in zend_throw_exception_internal()
171 OBJ_RELEASE(exception); in zend_throw_exception_internal()
175 zend_exception_set_previous(exception, EG(exception)); in zend_throw_exception_internal()
176 EG(exception) = exception; in zend_throw_exception_internal()
183 …if (exception && (exception->ce == zend_ce_parse_error || exception->ce == zend_ce_compile_error))… in zend_throw_exception_internal()
186 if (EG(exception)) { in zend_throw_exception_internal()
187 zend_exception_error(EG(exception), E_ERROR); in zend_throw_exception_internal()
194 zend_throw_exception_hook(exception); in zend_throw_exception_internal()
208 zend_object *exception; in zend_clear_exception() local
213 if (!EG(exception)) { in zend_clear_exception()
217 exception = EG(exception); in zend_clear_exception()
218 EG(exception) = NULL; in zend_clear_exception()
219 OBJ_RELEASE(exception); in zend_clear_exception()
619 if (EG(exception)) { in ZEND_METHOD()
656 zval trace, *exception; in ZEND_METHOD() local
667 exception = ZEND_THIS; in ZEND_METHOD()
670 …while (exception && Z_TYPE_P(exception) == IS_OBJECT && instanceof_function(Z_OBJCE_P(exception), … in ZEND_METHOD()
672 zend_string *message = zval_get_string(GET_PROPERTY(exception, ZEND_STR_MESSAGE)); in ZEND_METHOD()
673 zend_string *file = zval_get_string(GET_PROPERTY(exception, ZEND_STR_FILE)); in ZEND_METHOD()
674 zend_long line = zval_get_long(GET_PROPERTY(exception, ZEND_STR_LINE)); in ZEND_METHOD()
678 fci.object = Z_OBJ_P(exception); in ZEND_METHOD()
691 …if ((Z_OBJCE_P(exception) == zend_ce_type_error || Z_OBJCE_P(exception) == zend_ce_argument_count_… in ZEND_METHOD()
700 ZSTR_VAL(Z_OBJCE_P(exception)->name), ZSTR_VAL(message), ZSTR_VAL(file), line, in ZEND_METHOD()
706 ZSTR_VAL(Z_OBJCE_P(exception)->name), ZSTR_VAL(file), line, in ZEND_METHOD()
716 Z_PROTECT_RECURSION_P(exception); in ZEND_METHOD()
717 exception = GET_PROPERTY(exception, ZEND_STR_PREVIOUS); in ZEND_METHOD()
718 if (exception && Z_TYPE_P(exception) == IS_OBJECT && Z_IS_RECURSIVE_P(exception)) { in ZEND_METHOD()
724 exception = ZEND_THIS; in ZEND_METHOD()
726 …le (exception && Z_TYPE_P(exception) == IS_OBJECT && (base_ce = i_get_exception_base(Z_OBJ_P(excep… in ZEND_METHOD()
727 if (Z_IS_RECURSIVE_P(exception)) { in ZEND_METHOD()
728 Z_UNPROTECT_RECURSION_P(exception); in ZEND_METHOD()
732 exception = GET_PROPERTY(exception, ZEND_STR_PREVIOUS); in ZEND_METHOD()
735 exception = ZEND_THIS; in ZEND_METHOD()
736 base_ce = i_get_exception_base(Z_OBJ_P(exception)); in ZEND_METHOD()
741 zend_update_property_ex(base_ce, Z_OBJ_P(exception), ZSTR_KNOWN(ZEND_STR_STRING), &tmp); in ZEND_METHOD()
924 zval exception, rv; in zend_exception_error() local
928 ZVAL_OBJ(&exception, ex); in zend_exception_error()
930 EG(exception) = NULL; in zend_exception_error()
932 zend_string *message = zval_get_string(GET_PROPERTY(&exception, ZEND_STR_MESSAGE)); in zend_exception_error()
933 zend_string *file = zval_get_string(GET_PROPERTY_SILENT(&exception, ZEND_STR_FILE)); in zend_exception_error()
934 zend_long line = zval_get_long(GET_PROPERTY_SILENT(&exception, ZEND_STR_LINE)); in zend_exception_error()
948 if (!EG(exception)) { in zend_exception_error()
957 if (EG(exception)) { in zend_exception_error()
960 ZVAL_OBJ(&zv, EG(exception)); in zend_exception_error()
976 str = zval_get_string(GET_PROPERTY_SILENT(&exception, ZEND_STR_STRING)); in zend_exception_error()
977 file = zval_get_string(GET_PROPERTY_SILENT(&exception, ZEND_STR_FILE)); in zend_exception_error()
978 line = zval_get_long(GET_PROPERTY_SILENT(&exception, ZEND_STR_LINE)); in zend_exception_error()
998 ZEND_API ZEND_COLD void zend_throw_exception_object(zval *exception) /* {{{ */ in zend_throw_exception_object() argument
1000 if (exception == NULL || Z_TYPE_P(exception) != IS_OBJECT) { in zend_throw_exception_object()
1004 zend_class_entry *exception_ce = Z_OBJCE_P(exception); in zend_throw_exception_object()
1008 zval_ptr_dtor(exception); in zend_throw_exception_object()
1012 zend_throw_exception_internal(Z_OBJ_P(exception)); in zend_throw_exception_object()
1018 ZEND_ASSERT(!EG(exception)); in zend_throw_unwind_exit()
1019 EG(exception) = zend_objects_new(&zend_ce_unwind_exit); in zend_throw_unwind_exit()