Den 2015-08-26 kl. 13:19, skrev Niklas Keller:
Hi Björn,


Ah yes, then a set_throwable_handler would be needed. A final question:
Would it
be an alternative to update set_error_handler to also handle
\Throwable\Error\*
exceptions and let set_exception_handler catching same type of exceptions
like
in PHP 5?

set_error_handler handles something completely different, that doesn't make
any sense. I think it should just remain as is, because
set_exception_handler is really just a last resort handler, no further
actions are executed afterwards. Otherwise, would a set_throwable_handler
then catch exceptions? I'd expect it to do so.

Regards, Niklas

Yes, the set_throwable_handler would then need to catch all exceptions. My thought on using set_error_handler was inspired by tweaks with register_shutdown_function
to make set_error_handler catching fatal errors.

Anyway, for our PHP 5 application having set_exception_handler catching everything won't be an issue, it's just the purist inside me ;-) Now heading for testing PHP 7 RCx!

Regards, //Björn


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

Reply via email to