Lines Matching refs:exception

37 void zend_exception_set_previous(zval *exception, zval *add_previous TSRMLS_DC)  in zend_exception_set_previous()  argument
41 if (exception == add_previous || !add_previous || !exception) { in zend_exception_set_previous()
48 …while (exception && exception != add_previous && Z_OBJ_HANDLE_P(exception) != Z_OBJ_HANDLE_P(add_p… in zend_exception_set_previous()
51 if (Z_OBJ_HANDLE_P(ancestor) == Z_OBJ_HANDLE_P(exception)) { in zend_exception_set_previous()
57 …previous = zend_read_property(default_exception_ce, exception, "previous", sizeof("previous")-1, 1… in zend_exception_set_previous()
59 …zend_update_property(default_exception_ce, exception, "previous", sizeof("previous")-1, add_previo… in zend_exception_set_previous()
63 exception = previous; in zend_exception_set_previous()
70 zend_exception_set_previous(EG(exception), EG(prev_exception) TSRMLS_CC); in zend_exception_save()
72 if (EG(exception)) { in zend_exception_save()
73 EG(prev_exception) = EG(exception); in zend_exception_save()
75 EG(exception) = NULL; in zend_exception_save()
82 if (EG(exception)) { in zend_exception_restore()
83 zend_exception_set_previous(EG(exception), EG(prev_exception) TSRMLS_CC); in zend_exception_restore()
85 EG(exception) = EG(prev_exception); in zend_exception_restore()
92 void zend_throw_exception_internal(zval *exception TSRMLS_DC) /* {{{ */ in zend_throw_exception_internal()
99 if (exception != NULL) { in zend_throw_exception_internal()
100 zend_get_object_classname(exception, &classname, &name_len TSRMLS_CC); in zend_throw_exception_internal()
108 if (exception != NULL) { in zend_throw_exception_internal()
109 zval *previous = EG(exception); in zend_throw_exception_internal()
110 zend_exception_set_previous(exception, EG(exception) TSRMLS_CC); in zend_throw_exception_internal()
111 EG(exception) = exception; in zend_throw_exception_internal()
117 if(EG(exception)) { in zend_throw_exception_internal()
118 zend_exception_error(EG(exception), E_ERROR TSRMLS_CC); in zend_throw_exception_internal()
124 zend_throw_exception_hook(exception TSRMLS_CC); in zend_throw_exception_internal()
143 if (!EG(exception)) { in zend_clear_exception()
146 zval_ptr_dtor(&EG(exception)); in zend_clear_exception()
147 EG(exception) = NULL; in zend_clear_exception()
193 ZEND_METHOD(exception, __clone) in ZEND_METHOD() argument
202 ZEND_METHOD(exception, __construct) in ZEND_METHOD() argument
237 ZEND_METHOD(exception, __wakeup) in ZEND_METHOD() argument
314 ZEND_METHOD(exception, getFile) in ZEND_METHOD() argument
324 ZEND_METHOD(exception, getLine) in ZEND_METHOD() argument
334 ZEND_METHOD(exception, getMessage) in ZEND_METHOD() argument
344 ZEND_METHOD(exception, getCode) in ZEND_METHOD() argument
354 ZEND_METHOD(exception, getTrace) in ZEND_METHOD() argument
617 ZEND_METHOD(exception, getTraceAsString) in ZEND_METHOD() argument
647 ZEND_METHOD(exception, getPrevious) in ZEND_METHOD() argument
672 ZEND_METHOD(exception, __toString) in ZEND_METHOD() argument
674 zval message, file, line, *trace, *exception; in ZEND_METHOD() local
684 exception = getThis(); in ZEND_METHOD()
687 …while (exception && Z_TYPE_P(exception) == IS_OBJECT && instanceof_function(Z_OBJCE_P(exception), … in ZEND_METHOD()
689 _default_exception_get_entry(exception, "message", sizeof("message")-1, &message TSRMLS_CC); in ZEND_METHOD()
690 _default_exception_get_entry(exception, "file", sizeof("file")-1, &file TSRMLS_CC); in ZEND_METHOD()
691 _default_exception_get_entry(exception, "line", sizeof("line")-1, &line TSRMLS_CC); in ZEND_METHOD()
699 fci.function_table = &Z_OBJCE_P(exception)->function_table; in ZEND_METHOD()
702 fci.object_ptr = exception; in ZEND_METHOD()
717 Z_OBJCE_P(exception)->name, Z_STRVAL(message), Z_STRVAL(file), Z_LVAL(line), in ZEND_METHOD()
722 Z_OBJCE_P(exception)->name, Z_STRVAL(file), Z_LVAL(line), in ZEND_METHOD()
731 Z_OBJPROP_P(exception)->nApplyCount++; in ZEND_METHOD()
732exception = zend_read_property(default_exception_ce, exception, "previous", sizeof("previous")-1, … in ZEND_METHOD()
733 if (exception && Z_TYPE_P(exception) == IS_OBJECT && Z_OBJPROP_P(exception)->nApplyCount > 0) { in ZEND_METHOD()
734 exception = NULL; in ZEND_METHOD()
745 exception = getThis(); in ZEND_METHOD()
746 …while (exception && Z_TYPE_P(exception) == IS_OBJECT && instanceof_function(Z_OBJCE_P(exception), … in ZEND_METHOD()
747 if(Z_OBJPROP_P(exception)->nApplyCount) { in ZEND_METHOD()
748 Z_OBJPROP_P(exception)->nApplyCount--; in ZEND_METHOD()
752exception = zend_read_property(default_exception_ce, exception, "previous", sizeof("previous")-1, … in ZEND_METHOD()
780 ZEND_ME(exception, __clone, NULL, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL)
781 ZEND_ME(exception, __construct, arginfo_exception___construct, ZEND_ACC_PUBLIC)
782 ZEND_ME(exception, __wakeup, NULL, ZEND_ACC_PUBLIC)
783 ZEND_ME(exception, getMessage, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
784 ZEND_ME(exception, getCode, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
785 ZEND_ME(exception, getFile, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
786 ZEND_ME(exception, getLine, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
787 ZEND_ME(exception, getTrace, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
788 ZEND_ME(exception, getPrevious, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
789 ZEND_ME(exception, getTraceAsString, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
790 ZEND_ME(exception, __toString, NULL, 0)
909 ZEND_API void zend_exception_error(zval *exception, int severity TSRMLS_DC) /* {{{ */ in zend_exception_error() argument
911 zend_class_entry *ce_exception = Z_OBJCE_P(exception); in zend_exception_error()
912 EG(exception) = NULL; in zend_exception_error()
916 zend_call_method_with_0_params(&exception, ce_exception, NULL, "__tostring", &str); in zend_exception_error()
917 if (!EG(exception)) { in zend_exception_error()
921 …zend_update_property_string(default_exception_ce, exception, "string", sizeof("string")-1, EG(exce… in zend_exception_error()
926 if (EG(exception)) { in zend_exception_error()
929 …file = zend_read_property(default_exception_ce, EG(exception), "file", sizeof("file")-1, 1 TSRMLS_… in zend_exception_error()
930 …line = zend_read_property(default_exception_ce, EG(exception), "line", sizeof("line")-1, 1 TSRMLS_… in zend_exception_error()
939 …%s in exception handling during call to %s::__tostring()", Z_OBJCE_P(EG(exception))->name, ce_exce… in zend_exception_error()
942 …str = zend_read_property(default_exception_ce, exception, "string", sizeof("string")-1, 1 TSRMLS_C… in zend_exception_error()
943 file = zend_read_property(default_exception_ce, exception, "file", sizeof("file")-1, 1 TSRMLS_CC); in zend_exception_error()
944 line = zend_read_property(default_exception_ce, exception, "line", sizeof("line")-1, 1 TSRMLS_CC); in zend_exception_error()
954 zval_ptr_dtor(&exception); in zend_exception_error()
958 ZEND_API void zend_throw_exception_object(zval *exception TSRMLS_DC) /* {{{ */ in zend_throw_exception_object()
962 if (exception == NULL || Z_TYPE_P(exception) != IS_OBJECT) { in zend_throw_exception_object()
966 exception_ce = Z_OBJCE_P(exception); in zend_throw_exception_object()
971 zend_throw_exception_internal(exception TSRMLS_CC); in zend_throw_exception_object()