Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77797 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 59787 invoked from network); 7 Oct 2014 11:25:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Oct 2014 11:25:36 -0000 Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 209.85.220.169 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.220.169 mail-vc0-f169.google.com Received: from [209.85.220.169] ([209.85.220.169:42160] helo=mail-vc0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D2/27-30869-FADC3345 for ; Tue, 07 Oct 2014 07:25:35 -0400 Received: by mail-vc0-f169.google.com with SMTP id hy4so4670880vcb.0 for ; Tue, 07 Oct 2014 04:25:32 -0700 (PDT) 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=9yHSJP+UEjJthgjdy0duES90cUbxJ7WXUCICUYgylUQ=; b=mBVATVgkInqaaC0Cj0eZQ8bu0gIkK9AHESpnW62rYUnlzLmnvO++Djr+EghzVVWfFD MD2K8sElwP7DTvVmG+Bu3hxit/cEFxL3sMqEIZN0XbYV34gdzzXrC/YTNaZvkfybYWI7 qnkWAN74YLjD7zi0A/eYTeSqr6QzOZh+08u0gMhtL3hcaKFXLBc+2t5kZ92rK3Ft82oM puftf6DM93YzslZ9FrXFTki/6d6EWCgMbec1rsxavQHm6iabCmUR+pK2Y67CFlE0lobT 6yC6WWinXrk819oNzrH79FO2qJtA7tehH+uuhgfrb4XvUgkQx/Gv+iUYh1C/axZhTXl2 O2Mg== X-Gm-Message-State: ALoCoQne57iIGj2dnkdzlW1sFhvIoo7S9Ov0b45gafwdIxsGNLx0r+C7+knMyqzKXYr+WI9ZPxq4kqtlCSbbAdl0sTCw732tvWeAlagdgy7O9SI5WSvxmO4u6DXFxu+WVDkrg/Or/MF+ZsINEdF0v9W9P0CRtGoJMQ== MIME-Version: 1.0 X-Received: by 10.221.73.10 with SMTP id yq10mr2566339vcb.53.1412681132288; Tue, 07 Oct 2014 04:25:32 -0700 (PDT) Received: by 10.52.158.197 with HTTP; Tue, 7 Oct 2014 04:25:32 -0700 (PDT) In-Reply-To: References: Date: Tue, 7 Oct 2014 15:25:32 +0400 Message-ID: To: Nikita Popov Cc: PHP internals Content-Type: multipart/alternative; boundary=001a113653dc12446f0504d375df Subject: Re: [PHP-DEV] [RFC] Exceptions in the engine From: dmitry@zend.com (Dmitry Stogov) --001a113653dc12446f0504d375df Content-Type: text/plain; charset=UTF-8 Hi Nikita, I very like the idea. Actually, it's a long time desired php feature that many big php users miss. They don't like to show 500 response in any case. Also +1 for removing ability of silent E_RECOVERABLE_ERROR bypass :) I think that few things may be "improved" 1) I'm not sure if "cacth(Exception $e)" should catch engine and parser exceptions. May be it's better to introduce interface or common parent class "Catchable" and then make Exception, EngineException and ParseException implement it. In case user would like to catch all the error at once they will able to use "catch(Catchable $e)", but cacth(Exception $e) would be 100% compatible. 2) I also think it's not a big problem to keep compatible error messages for uncaught EngineException and ParseException. I'm not sure if that "Uncaught EngineException:" really need. Thanks. Dmitry. On Tue, Oct 7, 2014 at 1:53 AM, 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 > --001a113653dc12446f0504d375df--