summaryrefslogtreecommitdiff
path: root/Zend/zend_reflection_api.c
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2003-08-30 13:38:23 +0000
committerMarcus Boerger <helly@php.net>2003-08-30 13:38:23 +0000
commite679504861565c4fb9e61ddd70b994ac922f6bb2 (patch)
tree80bd474be490f5f596e0f16f9865c0cf52ae0f9d /Zend/zend_reflection_api.c
parent49a538d054e0343e931924591584e693ed8d4d01 (diff)
downloadphp-git-e679504861565c4fb9e61ddd70b994ac922f6bb2.tar.gz
Be precise
Diffstat (limited to 'Zend/zend_reflection_api.c')
-rw-r--r--Zend/zend_reflection_api.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/Zend/zend_reflection_api.c b/Zend/zend_reflection_api.c
index 8119eb631f..a5c0b0f753 100644
--- a/Zend/zend_reflection_api.c
+++ b/Zend/zend_reflection_api.c
@@ -976,8 +976,18 @@ ZEND_METHOD(reflection_method, invoke)
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);