Lines Matching refs:exception

74 void zend_exception_set_previous(zend_object *exception, zend_object *add_previous) /* {{{ */  in zend_exception_set_previous()  argument
80 if (exception == add_previous || !add_previous || !exception) { in zend_exception_set_previous()
88 ZVAL_OBJ(&zv, exception); in zend_exception_set_previous()
114 zend_exception_set_previous(EG(exception), EG(prev_exception)); in zend_exception_save()
116 if (EG(exception)) { in zend_exception_save()
117 EG(prev_exception) = EG(exception); in zend_exception_save()
119 EG(exception) = NULL; in zend_exception_save()
126 if (EG(exception)) { in zend_exception_restore()
127 zend_exception_set_previous(EG(exception), EG(prev_exception)); in zend_exception_restore()
129 EG(exception) = EG(prev_exception); in zend_exception_restore()
136 ZEND_API ZEND_COLD void zend_throw_exception_internal(zval *exception) /* {{{ */ in zend_throw_exception_internal() argument
140 if (exception != NULL) { in zend_throw_exception_internal()
141 DTRACE_EXCEPTION_THROWN(ZSTR_VAL(Z_OBJ_P(exception)->ce->name)); in zend_throw_exception_internal()
148 if (exception != NULL) { in zend_throw_exception_internal()
149 zend_object *previous = EG(exception); in zend_throw_exception_internal()
150 zend_exception_set_previous(Z_OBJ_P(exception), EG(exception)); in zend_throw_exception_internal()
151 EG(exception) = Z_OBJ_P(exception); in zend_throw_exception_internal()
157 if (exception && Z_OBJCE_P(exception) == zend_ce_parse_error) { in zend_throw_exception_internal()
160 if(EG(exception)) { in zend_throw_exception_internal()
161 zend_exception_error(EG(exception), E_ERROR); in zend_throw_exception_internal()
167 zend_throw_exception_hook(exception); in zend_throw_exception_internal()
188 if (!EG(exception)) { in zend_clear_exception()
191 OBJ_RELEASE(EG(exception)); in zend_clear_exception()
192 EG(exception) = NULL; in zend_clear_exception()
256 ZEND_COLD ZEND_METHOD(exception, __clone) in ZEND_METHOD() argument
265 ZEND_METHOD(exception, __construct) in ZEND_METHOD() argument
314 ZEND_METHOD(exception, __wakeup) in ZEND_METHOD() argument
402 ZEND_METHOD(exception, getFile) in ZEND_METHOD() argument
414 ZEND_METHOD(exception, getLine) in ZEND_METHOD() argument
426 ZEND_METHOD(exception, getMessage) in ZEND_METHOD() argument
438 ZEND_METHOD(exception, getCode) in ZEND_METHOD() argument
450 ZEND_METHOD(exception, getTrace) in ZEND_METHOD() argument
607 ZEND_METHOD(exception, getTraceAsString) in ZEND_METHOD() argument
645 ZEND_METHOD(exception, getPrevious) in ZEND_METHOD() argument
680 ZEND_METHOD(exception, __toString) in ZEND_METHOD() argument
682 zval trace, *exception; in ZEND_METHOD() local
693 exception = getThis(); in ZEND_METHOD()
696 …while (exception && Z_TYPE_P(exception) == IS_OBJECT && instanceof_function(Z_OBJCE_P(exception), … in ZEND_METHOD()
698 zend_string *message = zval_get_string(GET_PROPERTY(exception, ZEND_STR_MESSAGE)); in ZEND_METHOD()
699 zend_string *file = zval_get_string(GET_PROPERTY(exception, ZEND_STR_FILE)); in ZEND_METHOD()
700 zend_long line = zval_get_long(GET_PROPERTY(exception, ZEND_STR_LINE)); in ZEND_METHOD()
704 fci.object = Z_OBJ_P(exception); in ZEND_METHOD()
717 …if ((Z_OBJCE_P(exception) == zend_ce_type_error || Z_OBJCE_P(exception) == zend_ce_argument_count_… in ZEND_METHOD()
726 ZSTR_VAL(Z_OBJCE_P(exception)->name), ZSTR_VAL(message), ZSTR_VAL(file), line, in ZEND_METHOD()
732 ZSTR_VAL(Z_OBJCE_P(exception)->name), ZSTR_VAL(file), line, in ZEND_METHOD()
742 Z_OBJPROP_P(exception)->u.v.nApplyCount++; in ZEND_METHOD()
743 exception = GET_PROPERTY(exception, ZEND_STR_PREVIOUS); in ZEND_METHOD()
744 …if (exception && Z_TYPE_P(exception) == IS_OBJECT && Z_OBJPROP_P(exception)->u.v.nApplyCount > 0) { in ZEND_METHOD()
750 exception = getThis(); in ZEND_METHOD()
752 …while (exception && Z_TYPE_P(exception) == IS_OBJECT && (base_ce = i_get_exception_base(exception)… in ZEND_METHOD()
753 if (Z_OBJPROP_P(exception)->u.v.nApplyCount) { in ZEND_METHOD()
754 Z_OBJPROP_P(exception)->u.v.nApplyCount--; in ZEND_METHOD()
758 exception = GET_PROPERTY(exception, ZEND_STR_PREVIOUS); in ZEND_METHOD()
761 exception = getThis(); in ZEND_METHOD()
762 base_ce = i_get_exception_base(exception); in ZEND_METHOD()
767 zend_update_property_ex(base_ce, exception, CG(known_strings)[ZEND_STR_STRING], &tmp); in ZEND_METHOD()
804 ZEND_ME(exception, __clone, NULL, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL)
805 ZEND_ME(exception, __construct, arginfo_exception___construct, ZEND_ACC_PUBLIC)
806 ZEND_ME(exception, __wakeup, NULL, ZEND_ACC_PUBLIC)
807 ZEND_ME(exception, getMessage, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
808 ZEND_ME(exception, getCode, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
809 ZEND_ME(exception, getFile, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
810 ZEND_ME(exception, getLine, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
811 ZEND_ME(exception, getTrace, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
812 ZEND_ME(exception, getPrevious, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
813 ZEND_ME(exception, getTraceAsString, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
814 ZEND_ME(exception, __toString, NULL, 0)
989 zval exception, rv; in zend_exception_error() local
992 ZVAL_OBJ(&exception, ex); in zend_exception_error()
993 ce_exception = Z_OBJCE(exception); in zend_exception_error()
994 EG(exception) = NULL; in zend_exception_error()
996 zend_string *message = zval_get_string(GET_PROPERTY(&exception, ZEND_STR_MESSAGE)); in zend_exception_error()
997 zend_string *file = zval_get_string(GET_PROPERTY_SILENT(&exception, ZEND_STR_FILE)); in zend_exception_error()
998 zend_long line = zval_get_long(GET_PROPERTY_SILENT(&exception, ZEND_STR_LINE)); in zend_exception_error()
1009 zend_call_method_with_0_params(&exception, ce_exception, NULL, "__tostring", &tmp); in zend_exception_error()
1010 if (!EG(exception)) { in zend_exception_error()
1014 …zend_update_property_ex(i_get_exception_base(&exception), &exception, CG(known_strings)[ZEND_STR_S… in zend_exception_error()
1019 if (EG(exception)) { in zend_exception_error()
1022 ZVAL_OBJ(&zv, EG(exception)); in zend_exception_error()
1038 str = zval_get_string(GET_PROPERTY_SILENT(&exception, ZEND_STR_STRING)); in zend_exception_error()
1039 file = zval_get_string(GET_PROPERTY_SILENT(&exception, ZEND_STR_FILE)); in zend_exception_error()
1040 line = zval_get_long(GET_PROPERTY_SILENT(&exception, ZEND_STR_LINE)); in zend_exception_error()
1055 ZEND_API ZEND_COLD void zend_throw_exception_object(zval *exception) /* {{{ */ in zend_throw_exception_object() argument
1059 if (exception == NULL || Z_TYPE_P(exception) != IS_OBJECT) { in zend_throw_exception_object()
1063 exception_ce = Z_OBJCE_P(exception); in zend_throw_exception_object()
1067 zval_ptr_dtor(exception); in zend_throw_exception_object()
1070 zend_throw_exception_internal(exception); in zend_throw_exception_object()