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

From: Date: Tue, 10 Dec 2013 20:10:14 +0000
Subject: Re: [VOTE] Allowing use of exceptions in the engine
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14  Groups: php.internals 
Request: Send a blank email to internals+get-70578@lists.php.net to get a copy of this message
On 10 December 2013 19:42, Stas Malyshev <smalyshev@sugarcrm.com> wrote: > Hi! > > > 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 > > The part that you're missing here is that it's not your data structures > that may be invalid, it's engine's. Not missing anything here - I know that stuff may be hugely broken (stack pointers & co for example). > And what you call "I can save and > quit", the engine calls "execute arbitrary amount of code", for which it > needs valid data structures. Unless your "save and quit" code does not > call any functions and does nothing useful at all, from the engine POV > your "save and quit" is no different from "continue working normally" - > it needs all the data structures to be in a perfect order as if nothing > bad happened. For some errors, it may be possible. For some, it may be > possible but hard. Yes, and it looks like Nikic actually identified a list of what looks like a big dealw and what not. I know it may be hard to guarantee that code can be executed after a fatal, but I wouldn't deny it upfront just because it's a non-trivial problem (or an undefined state of the engine). Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/

« previous php.internals (#70578) next »