Re: Throwable patch(es) and finalizing the story

From: Date: Sun, 17 May 2015 05:07:28 +0000
Subject: Re: Throwable patch(es) and finalizing the story
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-86284@lists.php.net to get a copy of this message
On 05/16/2015 10:57 PM, Stanislav Malyshev wrote: > I am assuming we have broad consensus about the move from BaseException > to Throwable. I've looked at the patch at > https://github.com/php/php-src/pull/1282 and it seems pretty > close to > what we want to me. The only difference is that > https://wiki.php.net/rfc/throwable says Throwable is an > interface and > this patch makes it abstract class It is supposed to be an interface. It it's not then it's a mistake in the patch. I strongly believe that the hierarchy for exceptions thrown by the engine must be separate from the hierarchy for exception thrown by userland code (and "regular" extensions such as Reflection, etc.). The whole purpose of the Throwable interface is to mark objects of both hierarchies as throwable. Whether we name the base class of the hierarchy for exceptions thrown by the engine Error or EngineException, I don't really care. But Error feels more right to me than EngineException. I do care, though, about the fact that userland code (and "regular" extensions such as Reflection, etc.) must not throw engine exceptions.

« previous php.internals (#86284) next »