cvs: ZendEngine2 / zend_reflection_api.c

From: Date: Sat, 30 Aug 2003 13:38:23 +0000
Subject: cvs: ZendEngine2 / zend_reflection_api.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-1743@lists.php.net to get a copy of this message
helly Sat Aug 30 09:38:23 2003 EDT Modified files: /ZendEngine2 zend_reflection_api.c Log: Be precise Index: ZendEngine2/zend_reflection_api.c diff -u ZendEngine2/zend_reflection_api.c:1.37 ZendEngine2/zend_reflection_api.c:1.38 --- ZendEngine2/zend_reflection_api.c:1.37 Sat Aug 30 08:58:35 2003 +++ ZendEngine2/zend_reflection_api.c Sat Aug 30 09:38:23 2003 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_reflection_api.c,v 1.37 2003/08/30 12:58:35 helly Exp $ */ +/* $Id: zend_reflection_api.c,v 1.38 2003/08/30 13:38:23 helly Exp $ */ #include "zend.h" #include "zend_API.h" #include "zend_default_classes.h" @@ -976,8 +976,18 @@ if (!(mptr->common.fn_flags & ZEND_ACC_PUBLIC) || (mptr->common.fn_flags & ZEND_ACC_ABSTRACT)) { - _DO_THROW("Trying to invoke a non-public or abstract method"); - /* Returns from this function */ + if (mptr->common.fn_flags & ZEND_ACC_ABSTRACT) { + zend_throw_exception_ex(zend_exception_get_abstract(), 0 TSRMLS_CC, + "Trying to invoke abstract method %s::%s", + mptr->common.scope->name, mptr->common.function_name); + } else { + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, + "Trying to invoke %s method %s::%s from scope %s", + mptr->common.fn_flags & ZEND_ACC_PROTECTED ? "protected" : "private", + mptr->common.scope->name, mptr->common.function_name, + Z_OBJCE_P(getThis())->name); + } + return; } params = safe_emalloc(sizeof(zval **), argc, 0);

« previous php.zend-engine.cvs (#1743) next »