From ede84fa3840708a719ed0a39a2fbfc14dbb7fcc2 Mon Sep 17 00:00:00 2001 From: Andi Gutmans Date: Sat, 29 Jun 2002 15:30:27 +0000 Subject: [PATCH] - Improve some error messages. --- Zend/zend_execute.c | 2 +- Zend/zend_execute_API.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 581de6f3e88..0686326480e 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -2560,7 +2560,7 @@ send_by_ref: EX(Ts)[EX(opline)->result.u.var].tmp_var = **value; zval_copy_ctor(&EX(Ts)[EX(opline)->result.u.var].tmp_var); } else { - zend_error(E_ERROR, "Undefined constant. Improve this error message"); + zend_error(E_ERROR, "Undefined class constant '%s'", EX(opline)->op2.u.constant.value.str.val); } } NEXT_OPCODE(); diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index d6120bf7ce0..e7515c60c0a 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -337,7 +337,7 @@ ZEND_API int zval_update_constant(zval **pp, void *arg TSRMLS_DC) last = tsrm_strtok_r(p->value.str.val, ":", &temp); if (zend_lookup_class(last, strlen(last), &ce TSRMLS_CC) == FAILURE) { - zend_error(E_ERROR, "Invalid class! Improve this error message"); + zend_error(E_ERROR, "Invalid class '%s'", last); } last = tsrm_strtok_r(NULL, ":", &temp); @@ -348,12 +348,12 @@ ZEND_API int zval_update_constant(zval **pp, void *arg TSRMLS_DC) break; } if (zend_hash_find(&(*ce)->class_table, last, strlen(last)+1, (void **)&ce) == FAILURE) { - zend_error(E_ERROR, "Invalid class! Improve this error message"); + zend_error(E_ERROR, "Invalid sub-class '%s'", last); } last = cur; } if (zend_hash_find(&(*ce)->constants_table, last, strlen(last)+1, (void **) &value) == FAILURE) { - zend_error(E_ERROR, "Invalid class! Improve this error message"); + zend_error(E_ERROR, "Invalid class constant '%s'", last); } const_value = **value; zval_copy_ctor(&const_value);