Re: [VOTE] Allowing use of exceptions in the engine

From: Date: Tue, 10 Dec 2013 13:15:59 +0000
Subject: Re: [VOTE] Allowing use of exceptions in the engine
References: 1 2 3 4 5 6 7 8 9 10 11 12  Groups: php.internals 
Request: Send a blank email to internals+get-70569@lists.php.net to get a copy of this message
On 10 December 2013 13:55, Zeev Suraski <zeev@zend.com> wrote: > > Nobody needs to work with exceptions if they dont want to, that fatal > error > > just shows up as a uncaught backtrace and fatals errors just like it > used to. > > > > Seems like a win win. > > Seems more like a lose/risk situation to me (lose BC for recoverable > errors, take risk with inconsistent data structures for fatal errors). The example in the doc is really good as a counter-argument for what you just said here. Being able to release a lock, close a connection, do some sort of "bail out with (no|small number of) victims" is REALLY important for some applications. If an application fatal'd, then I don't really care if my data structures are invalid: I just want to save what I can save and quit. If I want to keep operating, then that's my problem and I'm the stupid guy in the room, so I don't see a reason for disallowing fatals to be dealt with in the userland code. That is a must-have in my opinion. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/

« previous php.internals (#70569) next »