Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82657 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 39987 invoked from network); 14 Feb 2015 00:55:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Feb 2015 00:55:14 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.42 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.216.42 mail-qa0-f42.google.com Received: from [209.85.216.42] ([209.85.216.42:40014] helo=mail-qa0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C4/64-15073-1FC9ED45 for ; Fri, 13 Feb 2015 19:55:14 -0500 Received: by mail-qa0-f42.google.com with SMTP id w8so14706529qac.1 for ; Fri, 13 Feb 2015 16:55:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=E5p35MjIXDWB4/zSGSDdn8632VRwq7q/NiMaaXnDqKs=; b=ox8O1Xkff4pO/oI530WWEqL7pIJab77urkWp7V+NdJ2AqOKEx4gcWaLAhGQfOoMapa bNZaPv8PjO+6mYKLzSp6gByhdpge54MPWliNEz+SJAA7aT46Va8f1kbSEiqiaKlVBlr8 VZMbo9DNCtMg6N9Byk4JetzF9j28BM8JjptU/deqSD2ce22iVLTBnv7BTL1fgfrCjuNP y0vCVjYvUdLdbzi7LK6alpvxyvofyGDWwW8u/hjiuhqDGAWsvoI+tNI1Zvy4gFUSB8ur 4uCfwqRj4443SJ3xoYjgMu38zDChmuJj7O83RHpAG+Ue5o6ci2R0i6PQIDCYyU0Ay529 xkHg== MIME-Version: 1.0 X-Received: by 10.140.39.84 with SMTP id u78mr28497803qgu.63.1423875311647; Fri, 13 Feb 2015 16:55:11 -0800 (PST) Received: by 10.96.185.37 with HTTP; Fri, 13 Feb 2015 16:55:10 -0800 (PST) Received: by 10.96.185.37 with HTTP; Fri, 13 Feb 2015 16:55:10 -0800 (PST) In-Reply-To: References: Date: Sat, 14 Feb 2015 07:55:10 +0700 Message-ID: To: Nikita Popov Cc: PHP internals Content-Type: multipart/alternative; boundary=001a11c1296827c1d8050f01ce29 Subject: Re: [PHP-DEV] Re: [RFC] Exceptions in the engine From: pierre.php@gmail.com (Pierre Joye) --001a11c1296827c1d8050f01ce29 Content-Type: text/plain; charset=UTF-8 Could you revive it in a new thread please? :) On Feb 13, 2015 3:25 PM, "Nikita Popov" wrote: > On Mon, Oct 6, 2014 at 11:53 PM, Nikita Popov > wrote: > > > Hi internals! > > > > During the PHP 5.6 development cycle I have proposed an RFC [1] that > > suggested the use of exceptions instead of fatal errors in the engine. At > > the time the proposal was declined, because the change was judged too > > intrusive for a minor version. > > > > As such I'm re-proposing this RFC for inclusion in PHP 7: > > > > https://wiki.php.net/rfc/engine_exceptions_for_php7 > > > > The RFC text is essentially the same as previously, with the primary > > difference being that parse errors are now converted to exceptions as > well. > > This was previously not possible due to limitations in the compiler > design. > > > > Thanks, > > Nikita > > > > [1]: https://wiki.php.net/rfc/engine_exceptions > > > > Feature freeze is not so far away now, so I'd like to bring this RFC up > again and proceed to voting shortly. There are two primary open questions: > > * Subclassing: Should there be more specific subclasses of EngineException > for particular errors? > * Superclassing: Should EngineException inherit from Exception (and as > such be subject to catch(Exception)) or should we introduce some kind of > special super-class that is not caught by default (like > Catchable/Throwable)? > > I don't think we can implement a high-quality subclassing scheme in a > timeframe for PHP 7, as such I would suggest to postpone this (if we > actually want to do it) to a later point in time. We can introduce > subclasses without BC issues in a minor version. > > The question of whether EngineException should inherit from Exception is > something we do have to consider now. Personally I prefer not introducing > any special exception types that aren't caught by default. I think that > would only make sense for errors that could occur literally everywhere > (like memory limit or timeout), but these are not handled by this RFC for > technical reasons. If someone has a strong opinion on this, I might make it > a voting option. > > Commentary on these, and also any other relevant points is very welcome! > > Thanks, > Nikita > > PS: The patch attached to the RFC is very outdated. I plan to only update > it to current master once the RFC passes (if it does), as I already had to > practically rewrite it a few times. > --001a11c1296827c1d8050f01ce29--