Re: Core functions throwing exceptions in PHP7

From: Date: Fri, 31 Jul 2015 10:20:56 +0000
Subject: Re: Core functions throwing exceptions in PHP7
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18  Groups: php.internals 
Request: Send a blank email to internals+get-87430@lists.php.net to get a copy of this message
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 <yohgaki@ohgaki.net>: > Hi Niklas, > > On Fri, Jul 31, 2015 at 5:12 PM, Niklas Keller <me@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 > yohgaki@ohgaki.net > >

« previous php.internals (#87430) next »