Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69868 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 73868 invoked from network); 25 Oct 2013 15:00:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Oct 2013 15:00:19 -0000 Authentication-Results: pb1.pair.com header.from=happy.melon.wiki@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=happy.melon.wiki@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.219.43 as permitted sender) X-PHP-List-Original-Sender: happy.melon.wiki@gmail.com X-Host-Fingerprint: 209.85.219.43 mail-oa0-f43.google.com Received: from [209.85.219.43] ([209.85.219.43:34829] helo=mail-oa0-f43.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8E/B6-40084-2878A625 for ; Fri, 25 Oct 2013 11:00:18 -0400 Received: by mail-oa0-f43.google.com with SMTP id m1so1034408oag.16 for ; Fri, 25 Oct 2013 08:00:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=4px1q8zTQ6wytio8enS1WJ15HydzjFhd9acxIrg5Ljg=; b=cjNOFhLNgINNNcGk3Iy6gH5gK324Zhl/ddVCeWpGuKrgiGvmt1WGG7HjoCRs+wM2d5 TApxEdqqC8Cymzkr4gqFMSVEcPEQI6vDuIJ2FgWmDIvMZHm0B5yc+iRn0AUxTay0JNzY /XW+InOlIa8ICUyzZb3IvjbQDJDnmnFls+NjgfuedfboHN4xbyWL0KIM/u53kKg9Nga5 7CgUHTY7h9/xpEeOSofbZOJRQxfBNNdczKty9CpXO56Ky51r3+1TACAryGAvFjM+19CY mMJTsdLZSTKCo7AEkMV7qECS9fnYJdtwbtY1zjKjjnP1dS3RUDOQEnyWOWu83AJPSmaj nNaA== MIME-Version: 1.0 X-Received: by 10.60.142.8 with SMTP id rs8mr3462254oeb.34.1382713215682; Fri, 25 Oct 2013 08:00:15 -0700 (PDT) Sender: happy.melon.wiki@gmail.com Received: by 10.182.114.1 with HTTP; Fri, 25 Oct 2013 08:00:15 -0700 (PDT) In-Reply-To: References: <52699FB5.20300@garfieldtech.com> <526A6BCC.3060502@php.net> <7048a577d3c04532b24585f6b043f913@EXCHLONDON2013.zoo.lan> Date: Fri, 25 Oct 2013 16:00:15 +0100 X-Google-Sender-Auth: hhEih8N6HH-2Yk87jjjJMFzvDYc Message-ID: To: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=047d7b33cd740c1b1204e9920213 Subject: Re: [PHP-DEV] [RFC] Exceptions in the engine From: happy.melon.wiki+gb@gmail.com (George Bond) --047d7b33cd740c1b1204e9920213 Content-Type: text/plain; charset=ISO-8859-1 On 25 October 2013 15:09, Richard Bradley wrote: > > -----Original Message----- > > From: Jordi Boggiano [mailto:j.boggiano@seld.be] > > Sent: 25 October 2013 15:03 > > To: Richard Bradley > > Cc: Joe Watkins; internals@lists.php.net; Larry Garfield > > Subject: Re: [PHP-DEV] [RFC] Exceptions in the engine > > > > On Fri, Oct 25, 2013 at 3:55 PM, Richard Bradley < > Richard.Bradley@softwire.com> wrote: > > >> How could anything be reliant on the behaviour of a fatal error in > any meaningful way ?? > > >> > > >> Cheers > > >> Joe > > > > > > In plenty of ways: for example currently frameworks can "catch" fatal > errors using "register_shutdown_function" and display an error page to the > end user (say if there is an attempt to call a method on a null object due > to an unanticipated runtime error). > > > > > > Current frameworks might be broken if the way fatal errors work is > changed. That would be a BC break. > > > > > > See e.g. > > > http://stackoverflow.com/questions/16284235/zend-framework-error-page- > > > for-php-fatal-errors/16284260#16284260 > > > > > > (This is not a vote for or against this proposal; I'm just answering > > > the immediate parent here.) > > > > Wouldn't this sort of use case be covered by the fact that an uncaught > exception would still result in a fatal error? The only case it'd "break" > is if you have a try/catch around your entire application, before you had > to listen to have a shutdown handler but now your catch would catch the > fatal exceptions before they bring everything down. > > You might still end up in the register_shutdown_function yes, but the > error code would have changed (from error_get_last()) > i.e. people may well be relying on the exact behaviour of fatal errors. > > It would be great to fix the somewhat messy state of exceptions & errors > in PHP, but we shouldn't pretend that we can do so without BC breaks. > > I think as far as BC breaks go, "in the event that my application has already become unusable to the end-user, now only the sensibly-structured catch-all codepath that we had to implement anyway is followed rather than that other much-nastier-to-work-with codepath" is pretty uncontroversial... --G --047d7b33cd740c1b1204e9920213--