Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62012 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 84843 invoked from network); 3 Aug 2012 16:04:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Aug 2012 16:04:22 -0000 Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.170 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.220.170 mail-vc0-f170.google.com Received: from [209.85.220.170] ([209.85.220.170:61068] helo=mail-vc0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E5/0D-09659-586FB105 for ; Fri, 03 Aug 2012 12:04:21 -0400 Received: by vcbgb30 with SMTP id gb30so970374vcb.29 for ; Fri, 03 Aug 2012 09:04:18 -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=uMjGF4MIQfzUppa7giDRvNPatH5uwSQFLC3Z4CI8EAQ=; b=xGZPWicpSzyc+pjbslUMqG2FZiBk39ox4RodwpE3wQlcyKjpn/KqPKkrGNVvDilt+e 5xxdMb4GD/ZzD715plrhU/zwdbDeZXdeTzXMyzVqTBR62LS3UrpCXvieBJNXsDuzZEhh O8KOyTKif6Nly90CrDUqMHTw3c6ueglCEBwKXcyuy48HwaihcJBQUh+nsiLKW3jUeKSs JchZhfSML5389GLLRS0W01H0S+XXA4hRH0TDeipySfyG4DR5fkyUzBahB/JX7hlmkgEv 1fFFZ4/QMakjouMfRqEJL/FL4yLnslVekrIEI78wL+/as7hZyt45pbxBCvbrWTYqSqjw bFFg== MIME-Version: 1.0 Received: by 10.52.75.166 with SMTP id d6mr1457607vdw.113.1344009858533; Fri, 03 Aug 2012 09:04:18 -0700 (PDT) Received: by 10.58.216.166 with HTTP; Fri, 3 Aug 2012 09:04:18 -0700 (PDT) In-Reply-To: <501BF3B7.9020304@ajf.me> References: <3F2B7A4F937D4FA9A1CE88818CBCEB1D@pc> <501BF3B7.9020304@ajf.me> Date: Fri, 3 Aug 2012 18:04:18 +0200 Message-ID: To: Andrew Faulds Cc: Stan Vass , Leigh , internals@lists.php.net Content-Type: multipart/alternative; boundary=20cf3071cc70314b2504c65eae97 Subject: Re: [PHP-DEV] Why do disabled functions / classes generate a WARNING. From: tyra3l@gmail.com (Ferenc Kovacs) --20cf3071cc70314b2504c65eae97 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable > > >> Warnings are special, they aren't really errors as such. They wouldn't > become exceptions. > > Also, why should an erroring function return a value? > > from "My experience shows it's best to have an error handler convert all errors to catchable exceptions, with some error types (like E_STRICT, E_ERROR etc.) to become instant fatal errors (can't be caught)." I think he is talking about turning everything(E_NOTICE, E_WARNING, etc.) into exceptions except a few, which can't be catched (why should E_STRICT be uncatchable?! ). Which brings up the issues that I mentioned before. Getting the return of an erroring function isn't such a big issue, but turning everything into exceptions would prevent getting any return value from any function/operation which triggers anything, Personally I think that turning everything into exceptions is a bad idea, and it would make stuff which possible currently impossible. On the other hand, I think that we have many E_ERROR which could be turned into E_RECOVERABLE_ERROR. Which in turn could be turned into Exception by an userland error handler if the php userland developer wishes it. --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu --20cf3071cc70314b2504c65eae97--