Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70574 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 55193 invoked from network); 10 Dec 2013 18:42:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Dec 2013 18:42:46 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 108.166.43.83 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 108.166.43.83 smtp83.ord1c.emailsrvr.com Linux 2.6 Received: from [108.166.43.83] ([108.166.43.83:53052] helo=smtp83.ord1c.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EA/A7-04453-5A067A25 for ; Tue, 10 Dec 2013 13:42:46 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp3.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id A86FC50411; Tue, 10 Dec 2013 13:42:43 -0500 (EST) X-Virus-Scanned: OK Received: by smtp3.relay.ord1c.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id E4CF6503B5; Tue, 10 Dec 2013 13:42:41 -0500 (EST) Message-ID: <52A760A1.4030107@sugarcrm.com> Date: Tue, 10 Dec 2013 10:42:41 -0800 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 MIME-Version: 1.0 To: Marco Pivetta , Zeev Suraski CC: Philip Sturgeon , Nikita Popov , PHP internals References: <6dc040b1d4917ab616951694d3f37575@mail.gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [VOTE] Allowing use of exceptions in the engine From: smalyshev@sugarcrm.com (Stas Malyshev) 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. 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. For some, it may not be possible. But the main point here is this: For the engine, there's no difference between "continue normally as nothing happened" and "save and quit", as soon as you start running PHP code that does anything useful at all. So if you can recover from an error, you can recover to a normal state. If you can not, then you can not. There's no "save and quit" scenario here that can do anything different. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227