Hello,

In monitoring type extensions such as Xdebug, APM etc it is common to
override zend_error_cb with a custom callback to intercept errors.
This however has a drawback: if user calls set_error_handler the
zend_error_cb does not get called at all for errors that can be
handled in userspace. There are a few approaches to solving this
(namely disabling set_error_handler or overriding set_error_handler)
but neither of them really seems like a good solution.

I made a simple patch that adds always_invoke_error_cb which allows
invoking the zend_error_cb in these cases (it needs to be set on
explicitly in an extension). error_handled_by_user setting allows
extensions to stop propagating the event if it's handled by user's
handler.

The patch is very simple and probably breaks horribly with some edge
cases. Ideas? Feedback?

http://pastie.org/702900

-- 
Mikko Koppanen

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to