- Improve some error messages.

This commit is contained in:
Andi Gutmans 2002-06-29 15:30:27 +00:00
parent 20d02565df
commit ede84fa384
2 changed files with 4 additions and 4 deletions

View File

@ -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();

View File

@ -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);