diff options
author | Aaron Piotrowski <aaron@trowski.com> | 2015-05-18 14:29:51 -0500 |
---|---|---|
committer | Aaron Piotrowski <aaron@trowski.com> | 2015-05-18 14:29:51 -0500 |
commit | 5c54bf015dc4fd930394709d80665d9a731f6f99 (patch) | |
tree | af288ee9ae218bc3f28be376088f0d5a3bef072f /Zend | |
parent | 99640cd013c9d32d21eb7de105fd159f8930ff0d (diff) | |
download | php-git-5c54bf015dc4fd930394709d80665d9a731f6f99.tar.gz |
Throwable method signatures.
Diffstat (limited to 'Zend')
-rw-r--r-- | Zend/zend_interfaces.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c index 2b8f8a25bc..3d8398d705 100644 --- a/Zend/zend_interfaces.c +++ b/Zend/zend_interfaces.c @@ -509,7 +509,7 @@ static int zend_implement_throwable(zend_class_entry *interface, zend_class_entr if (instanceof_function(class_type, zend_exception_get_default()) || instanceof_function(class_type, zend_get_error())) { return SUCCESS; } - zend_error_noreturn(E_CORE_ERROR, "Class %s cannot implement interface %s, extend Exception instead", + zend_error_noreturn(E_CORE_ERROR, "Class %s cannot implement interface %s, extend Exception or Error instead", class_type->name->val, interface->name->val); return FAILURE; @@ -565,7 +565,17 @@ const zend_function_entry zend_funcs_serializable[] = { }; /* }}} */ -const zend_function_entry *zend_funcs_throwable = NULL; +const zend_function_entry zend_funcs_throwable[] = { + ZEND_ABSTRACT_ME(throwable, getMessage, NULL) + ZEND_ABSTRACT_ME(throwable, getCode, NULL) + ZEND_ABSTRACT_ME(throwable, getFile, NULL) + ZEND_ABSTRACT_ME(throwable, getLine, NULL) + ZEND_ABSTRACT_ME(throwable, getTrace, NULL) + ZEND_ABSTRACT_ME(throwable, getPrevious, NULL) + ZEND_ABSTRACT_ME(throwable, getTraceAsString, NULL) + ZEND_ABSTRACT_ME(throwable, __toString, NULL) + ZEND_FE_END +}; #define REGISTER_ITERATOR_INTERFACE(class_name, class_name_str) \ {\ |