Re: Throwable and Error exceptions break existing PHP 5.x code

From: Date: Mon, 11 Jan 2016 20:15:55 +0000
Subject: Re: Throwable and Error exceptions break existing PHP 5.x code
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-90518@lists.php.net to get a copy of this message
On 11 January 2016 at 06:05, Rowan Collins <rowan.collins@gmail.com> wrote: > Since set_exception_handler() is intended as a last-ditch "something's gone > very wrong" function anyway, I think it receiving all Throwables makes > sense, even if the BC break in your scenario is unfortunate. Agreed entirely (as I also said last time this came up). I also don't want a third path involving a set_throwable_handler() or similar; we have one too many error handling paths already. One problematic thing that we _can_ help mitigate is that the first section of the backward incompatible changes page in the manual starts with the changes to error and exception handling, but never mentions this specific issue (type declarations on the exception handler breaking). That's entirely my fault (I've mentioned it enough in conference talks that I guess I thought I'd documented it, but hadn't), and I'll go fix that now. Adam

« previous php.internals (#90518) next »