Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70534 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 58701 invoked from network); 8 Dec 2013 14:33:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Dec 2013 14:33:56 -0000 Authentication-Results: pb1.pair.com smtp.mail=zeev@zend.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=zeev@zend.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain zend.com from 209.85.128.176 cause and error) X-PHP-List-Original-Sender: zeev@zend.com X-Host-Fingerprint: 209.85.128.176 mail-ve0-f176.google.com Received: from [209.85.128.176] ([209.85.128.176:40462] helo=mail-ve0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DB/28-01020-25384A25 for ; Sun, 08 Dec 2013 09:33:55 -0500 Received: by mail-ve0-f176.google.com with SMTP id oz11so2721849veb.35 for ; Sun, 08 Dec 2013 06:33:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=yS7US2XTtpmeqOO9vDHHk1j8D5tzNIFx7L0PhAG0APM=; b=kQmf3u589tA0Ll6d8o4FkXPEmqOivwPaE6B6Zj/Ex47BLYeBUp59/7+yQ8ca/A2c/w +gr+lOWkDJ64VJOaTqcdMi3kwwM5wF1M54eYxK45+1kytP1dVhseSbTCSb8r3jACgnKC 1NZL3cZ8mEhnD0UHM2BEmUAI2UIAKBaP/jMLswlcSOwEvUsauk/ortI2JPXy57no4h0X 9/UZBzq7bOrZU5Mfld8zt7LT8e0dgDV8RP3PWcbscQa32W7EV/47Kp3G358HZ+I64IoY ZzHQDrvnheBXd8SBTVCihIiTjx9whi3HnIr/f5fKAXC/08zsAj/u08ZGZvfF6CGWJou6 x7hA== X-Gm-Message-State: ALoCoQnse9Cvo8CgfUp8vHdD1YlppMulX2E8Rn7WhqXSltfiowoPyARPltD1HlZe70JRDku+FYL1bP1j4Smk6wDJeLDho/y0NL0Pce/SyE62fz0DetlK5XXIR8qiFapA3t0ON1evNjGV MIME-Version: 1.0 X-Received: by 10.58.207.76 with SMTP id lu12mr346822vec.30.1386513232165; Sun, 08 Dec 2013 06:33:52 -0800 (PST) Received: by 10.220.70.11 with HTTP; Sun, 8 Dec 2013 06:33:52 -0800 (PST) In-Reply-To: References: Date: Sun, 8 Dec 2013 16:33:52 +0200 Message-ID: To: Nikita Popov Cc: PHP internals Content-Type: multipart/alternative; boundary=047d7b677878ae403004ed06c4fa Subject: Re: [PHP-DEV] [VOTE] Allowing use of exceptions in the engine From: zeev@zend.com (Zeev Suraski) --047d7b677878ae403004ed06c4fa Content-Type: text/plain; charset=UTF-8 On Sun, Dec 8, 2013 at 4:18 PM, Nikita Popov wrote: > > Hi Zeev! > > I think this is a misunderstanding... I'm not suggesting to simply let the > engine continue after an E_ERROR - as you pointed out, that would likely > just crash it a few lines further down. > > This RFC is mainly a policy RFC: The goal is to allow the use of > exceptions in the engine and to allow changing existing fatal errors to > exceptions. The change from fatal errors to exceptions needs to happen > manually, by adjusting the surrounding code to support continued execution > (usually that means freeing resources + returning). A lot of fatal errors > are easy to change, others are very hard or impossible. Changing fatal > errors to exceptions rather than recoverable errors is both more useful to > the end user and technically easier (as recoverable errors need to continue > execution in the same codepath, which is often a lot harder to implement > and find appropriate semantics for), which is why I'm suggesting this > particular course of action. > > So, basically what I'm suggest is what you say in the last paragraph, just > going directly to exceptions rather than converting to E_RECOVERABLE_ERROR > :) > > Hope this is a bit clearer. > OK, got you. Not using exceptions in the engine was also a design decision (so that we don't force OO concepts on non-OO people) - need to think if it still makes sense and get back to the vote. Thanks! Zeev --047d7b677878ae403004ed06c4fa--