Why does zend_call_function return SUCCESS if an exception is thrown
| From: | Herman Radtke | Date: | Sat, 09 Apr 2011 16:03:16 +0000 |
| Subject: | Why does zend_call_function return SUCCESS if an exception is thrown | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-51849@lists.php.net to get a copy of this message | ||
An extension is using zend_call_function to call a userland function.
If the userland function throws an exception, zend_call_function will
still return SUCCESS. Why isn't zend_call_function returning FAILURE
on an exception? Is there a way to check if an exception was thrown
after zend_call_function returns a SUCCESS?
For reference I am looking in Zend/zend_execute_API.c:
if (EG(exception)) {
zend_throw_exception_internal(NULL TSRMLS_CC);
}
return SUCCESS;
--
Herman Radtke
hermanradtke@gmail.com | http://hermanradtke.com