Using set_error_handler isn't handling errors gracefully. Well, it's better than E_ERROR, but then libraries can't handle those errors gracefully, because the user might override its error handler by setting an own handler.
Regards, Niklas 2015-07-31 11:46 GMT+02:00 Yasuo Ohgaki <yohg...@ohgaki.net>: > Hi Niklas, > > On Fri, Jul 31, 2015 at 5:12 PM, Niklas Keller <m...@kelunik.com> wrote: > >> I think the question is more whether Exception or Error (class, not >> E_RECOVERABLE_ERROR), to allow handling it gracefully. >> > > E_WARNING is too weak for CSPRNG not available. > It's fatal error. > > I agree fatal errors should be able to handle gracefully if it is possible. > That's the reason why I prepared a patch that changes session E_ERROR > to E_RECOVERABLE_ERROR. > > > https://github.com/php/php-src/compare/master...yohgaki:master-e_recoverable_error?expand=1 > > It's inspired by this thread :) > > Regards, > > -- > Yasuo Ohgaki > yohg...@ohgaki.net > >