Re: [RFC] Exceptions in the engine

From: Date: Mon, 06 Oct 2014 22:12:31 +0000
Subject: Re: [RFC] Exceptions in the engine
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-77792@lists.php.net to get a copy of this message
Hi Nikita, On 06 Oct 2014, at 23:53, Nikita Popov <nikita.ppv@gmail.com> wrote: [...] > As such I'm re-proposing this RFC for inclusion in PHP 7: > > https://wiki.php.net/rfc/engine_exceptions_for_php7 > > The RFC text is essentially the same as previously, with the primary > difference being that parse errors are now converted to exceptions as well. > This was previously not possible due to limitations in the compiler design. I very much like the idea of making fatal errors exceptions, so: thumbs up! Is there a way to introduce different exception classes for different errors. E.g. - UndefinedMethodException for stdClass::method() - NullPointerException for null::method() - UndefinedFunctionException for invalid_function() - etc. They could all extend EngineException to have a common base class but I am sure we could find good abstractions for an exception inheritance tree. What do you think? cu, Lars

Attachment: [application/pgp-signature] Message signed with OpenPGP using GPGMail signature.asc
« previous php.internals (#77792) next »