Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62612 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45979 invoked from network); 31 Aug 2012 17:07:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Aug 2012 17:07:15 -0000 Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.42 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.160.42 mail-pb0-f42.google.com Received: from [209.85.160.42] ([209.85.160.42:58350] helo=mail-pb0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 18/A1-37167-24FE0405 for ; Fri, 31 Aug 2012 13:07:15 -0400 Received: by pbbrp8 with SMTP id rp8so5023670pbb.29 for ; Fri, 31 Aug 2012 10:07:12 -0700 (PDT) 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=ecfVUcdeGYlDsLft0rzewMkG0J2jr3yl+hqcxI+iY3I=; b=AhkEhJuKpJjdf6DIidFY3E/SbBsrPYmKF+jZHKnwVNoQ/sgwPfVsy5VWBGTg5qsAdW Wfjfe8GEbz2C1Nt+2D2JTj757YolLspS1xmYwoPzijHJAqw3hWD2M6IN33MDooYvaEYG CMRdpEqlo34KXMe8ea7LUQpWyPiVEEIMfVoOVPswtqpkzg7Sd8vG+IxTumsOtJWMA+V8 sYN+azwPA0EbTNkH9cwxTiQIQDJ1BPMp4SCxHWFNFTJVFTVMnOZa8YSBI+0ULxoowpbI U+QySrEZX+jwUDKhp2KNtoGsWsnCfCxj9kqtYyk/hD8qo/JvnU1/TCCZlEGziwJMgRbQ cNIA== MIME-Version: 1.0 Received: by 10.68.138.163 with SMTP id qr3mr13844572pbb.161.1346432832403; Fri, 31 Aug 2012 10:07:12 -0700 (PDT) Received: by 10.68.211.37 with HTTP; Fri, 31 Aug 2012 10:07:12 -0700 (PDT) In-Reply-To: References: <5040DC47.8000305@ajf.me> Date: Fri, 31 Aug 2012 19:07:12 +0200 Message-ID: To: Anthony Ferrara Cc: Andrew Faulds , PHP Internals Content-Type: multipart/alternative; boundary=047d7b15fb15b077ba04c892d270 Subject: Re: [PHP-DEV] Re: Are exceptions allowed in php core? From: tyra3l@gmail.com (Ferenc Kovacs) --047d7b15fb15b077ba04c892d270 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Fri, Aug 31, 2012 at 7:03 PM, Anthony Ferrara wrote= : > Ferenc, > > >> Not for PHP 5.5 (if that's happening?), but for PHP 6 I think a lot o= f >> > things should become exceptions. >> >> >> From the impression that I get from reading through the mailing list >> threads and the irc discussions I think that there aren't that many thin= gs >> that could turn into exceptions. >> E_RECOVERABLE_ERROR and probably that's it. > > > Actually, from my look at it, almost all E_WARNINGs, a number of E_NOTICE= s > (the ones that make sense to transition, like array to string cast), > E_RECOVERABLE and certain E_ERROR (such as call to undefined method, etc) > can be turned pretty easily. The ones that can't (without significant > change to the engine at least) are deeper E_ERROR, E_CORE_*, and E_PARSE.= .. > > Take a look at the library I am linking to deeper down. All of those > errors are core thrown errors that can be easily turned into exceptions. > Plus the E_ERROR that I couldn't, but we can in core (again, call to > undefined method, etc)... > > >> > I don't think that, personally, PHP's current error handling system is >> > sufficient for properly handling errors. >> >> >> It is working for years, it could be improved but I wouldn't call it >> insufficient. > > > Any system where it's **harder** to handle the error properly than to > ignore it is insufficient in my book. The fact that you need something li= ke > this: https://github.com/ircmaxell/ErrorExceptions to handle errors > properly as exceptions (to be notified not that an error occured, but the > type of error) is indicative of that... > > Anthony > sigh. --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu --047d7b15fb15b077ba04c892d270--