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()
49 …previous = zend_read_property(default_exception_ce, exception, "previous", sizeof("previous")-1, 1… in zend_exception_set_previous()
51 …zend_update_property(default_exception_ce, exception, "previous", sizeof("previous")-1, add_previo… in zend_exception_set_previous()
55 exception = previous; in zend_exception_set_previous()
62 zend_exception_set_previous(EG(exception), EG(prev_exception) TSRMLS_CC); in zend_exception_save()
64 if (EG(exception)) { in zend_exception_save()
65 EG(prev_exception) = EG(exception); in zend_exception_save()
67 EG(exception) = NULL; in zend_exception_save()
74 if (EG(exception)) { in zend_exception_restore()
75 zend_exception_set_previous(EG(exception), EG(prev_exception) TSRMLS_CC); in zend_exception_restore()
77 EG(exception) = EG(prev_exception); in zend_exception_restore()
84 void zend_throw_exception_internal(zval *exception TSRMLS_DC) /* {{{ */ in zend_throw_exception_internal()
91 if (exception != NULL) { in zend_throw_exception_internal()
92 zend_get_object_classname(exception, &classname, &name_len TSRMLS_CC); in zend_throw_exception_internal()
100 if (exception != NULL) { in zend_throw_exception_internal()
101 zval *previous = EG(exception); in zend_throw_exception_internal()
102 zend_exception_set_previous(exception, EG(exception) TSRMLS_CC); in zend_throw_exception_internal()
103 EG(exception) = exception; in zend_throw_exception_internal()
109 if(EG(exception)) { in zend_throw_exception_internal()
110 zend_exception_error(EG(exception), E_ERROR TSRMLS_CC); in zend_throw_exception_internal()
116 zend_throw_exception_hook(exception TSRMLS_CC); in zend_throw_exception_internal()
135 if (!EG(exception)) { in zend_clear_exception()
138 zval_ptr_dtor(&EG(exception)); in zend_clear_exception()
139 EG(exception) = NULL; in zend_clear_exception()
185 ZEND_METHOD(exception, __clone) in ZEND_METHOD() argument
194 ZEND_METHOD(exception, __construct) in ZEND_METHOD() argument
233 ZEND_METHOD(exception, __wakeup) in ZEND_METHOD() argument
306 ZEND_METHOD(exception, getFile) in ZEND_METHOD() argument
316 ZEND_METHOD(exception, getLine) in ZEND_METHOD() argument
326 ZEND_METHOD(exception, getMessage) in ZEND_METHOD() argument
336 ZEND_METHOD(exception, getCode) in ZEND_METHOD() argument
346 ZEND_METHOD(exception, getTrace) in ZEND_METHOD() argument
609 ZEND_METHOD(exception, getTraceAsString) in ZEND_METHOD() argument
639 ZEND_METHOD(exception, getPrevious) in ZEND_METHOD() argument
663 ZEND_METHOD(exception, __toString) in ZEND_METHOD() argument
665 zval message, file, line, *trace, *exception; in ZEND_METHOD() local
675 exception = getThis(); in ZEND_METHOD()
678 …while (exception && Z_TYPE_P(exception) == IS_OBJECT && instanceof_function(Z_OBJCE_P(exception), … in ZEND_METHOD()
680 _default_exception_get_entry(exception, "message", sizeof("message")-1, &message TSRMLS_CC); in ZEND_METHOD()
681 _default_exception_get_entry(exception, "file", sizeof("file")-1, &file TSRMLS_CC); in ZEND_METHOD()
682 _default_exception_get_entry(exception, "line", sizeof("line")-1, &line TSRMLS_CC); in ZEND_METHOD()
690 fci.function_table = &Z_OBJCE_P(exception)->function_table; in ZEND_METHOD()
693 fci.object_ptr = exception; in ZEND_METHOD()
708 Z_OBJCE_P(exception)->name, Z_STRVAL(message), Z_STRVAL(file), Z_LVAL(line), in ZEND_METHOD()
713 Z_OBJCE_P(exception)->name, Z_STRVAL(file), Z_LVAL(line), in ZEND_METHOD()
722exception = zend_read_property(default_exception_ce, exception, "previous", sizeof("previous")-1, … in ZEND_METHOD()
756 ZEND_ME(exception, __clone, NULL, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL)
757 ZEND_ME(exception, __construct, arginfo_exception___construct, ZEND_ACC_PUBLIC)
758 ZEND_ME(exception, __wakeup, NULL, ZEND_ACC_PUBLIC)
759 ZEND_ME(exception, getMessage, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
760 ZEND_ME(exception, getCode, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
761 ZEND_ME(exception, getFile, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
762 ZEND_ME(exception, getLine, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
763 ZEND_ME(exception, getTrace, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
764 ZEND_ME(exception, getPrevious, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
765 ZEND_ME(exception, getTraceAsString, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
766 ZEND_ME(exception, __toString, NULL, 0)
885 ZEND_API void zend_exception_error(zval *exception, int severity TSRMLS_DC) /* {{{ */ in zend_exception_error() argument
887 zend_class_entry *ce_exception = Z_OBJCE_P(exception); in zend_exception_error()
891 EG(exception) = NULL; in zend_exception_error()
893 zend_call_method_with_0_params(&exception, ce_exception, NULL, "__tostring", &str); in zend_exception_error()
894 if (!EG(exception)) { in zend_exception_error()
898 …zend_update_property_string(default_exception_ce, exception, "string", sizeof("string")-1, EG(exce… in zend_exception_error()
903 if (EG(exception)) { in zend_exception_error()
906 …file = zend_read_property(default_exception_ce, EG(exception), "file", sizeof("file")-1, 1 TSRMLS_… in zend_exception_error()
907 …line = zend_read_property(default_exception_ce, EG(exception), "line", sizeof("line")-1, 1 TSRMLS_… in zend_exception_error()
916 …%s in exception handling during call to %s::__tostring()", Z_OBJCE_P(EG(exception))->name, ce_exce… in zend_exception_error()
919 …str = zend_read_property(default_exception_ce, exception, "string", sizeof("string")-1, 1 TSRMLS_C… in zend_exception_error()
920 file = zend_read_property(default_exception_ce, exception, "file", sizeof("file")-1, 1 TSRMLS_CC); in zend_exception_error()
921 line = zend_read_property(default_exception_ce, exception, "line", sizeof("line")-1, 1 TSRMLS_CC); in zend_exception_error()
934 ZEND_API void zend_throw_exception_object(zval *exception TSRMLS_DC) /* {{{ */ in zend_throw_exception_object()
938 if (exception == NULL || Z_TYPE_P(exception) != IS_OBJECT) { in zend_throw_exception_object()
942 exception_ce = Z_OBJCE_P(exception); in zend_throw_exception_object()
947 zend_throw_exception_internal(exception TSRMLS_CC); in zend_throw_exception_object()