Re: [RFC] Exceptions in the engine

From: Date: Fri, 25 Oct 2013 09:59:11 +0000
Subject: Re: [RFC] Exceptions in the engine
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-69863@lists.php.net to get a copy of this message
On 24 окт. 2013 г., at 21:41, Nikita Popov <nikita.ppv@gmail.com> wrote: > I'd like to propose an RFC, which allows the use of exceptions within the > engine and also allows changing existing fatal errors to exceptions: > > https://wiki.php.net/rfc/engine_exceptions > > This topic has been cropping up in the discussions for several of the > recent RFCs and I think the time has come to consider moving away from > fatal errors. > > Thoughts? Thank you, Nikita! That’s something which definitely needs to be done. Catching parse-errors from includes, bad function/method calls, etc. will let us make complex code-bases more robust and predictable. I think introduction of BaseException is a necessity. This way code will stay compatible and new exceptions will just end their life somewhere in shutdown-handler, just as fatal errors do now. Rowan proposed to use subclasses for different exception types — I believe it can wait a bit. There is no need to overcomplicate this. New classes would be added eventually, but as they will be extending EngineException forward-compatibility is preserved. converting fatal-errors is a safe-enough change to be done in 5.NEXT. converting some of the warnings is a good topic for starting 6.x -- Alexey Zakhlestin CTO at Grids.by/you https://github.com/indeyets PGP key: http://indeyets.ru/alexey.zakhlestin.pgp.asc

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