I tried to keep the implementation simpler in the first PR, but I think the 
second I submitted is much better and should be closer to what you had in mind.

The second PR does not prevent user space code from instigating Error, but I do 
have another branch that does prevent it (same behavior as trying to write `new 
Closure()`) that I could merge if it is decided that the behavior is desired.

Aaron Piotrowski

(Sorry for originally sending this to you directly Sebastian, I’m new to the 
list and thought I could just hit reply.)

> On May 17, 2015, at 12:07 AM, Sebastian Bergmann <sebast...@php.net> wrote:
> 
> 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.
> 
> -- 
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


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

Reply via email to