Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:59352 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 41703 invoked from network); 4 Apr 2012 14:33:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Apr 2012 14:33:25 -0000 Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 209.85.216.47 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 209.85.216.47 mail-qa0-f47.google.com Received: from [209.85.216.47] ([209.85.216.47:38323] helo=mail-qa0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 20/80-38045-3BB5C7F4 for ; Wed, 04 Apr 2012 10:33:24 -0400 Received: by qabg1 with SMTP id g1so506781qab.13 for ; Wed, 04 Apr 2012 07:33:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding:x-gm-message-state; bh=/+TEd9iwXSMWgxGu6WgNLVYy/IHMOpYxO9v2nnTozew=; b=CnPgpHYSQYRz8Cqbp29sO+wi34idw4D/Pbz38qJYF5Hhw772WmM8T8F8g7R4+LDgx4 HE9xQluaM85i+jUoIACE7mVLG8rQPdtMGOiVTWAQ8xt2nkkPz2R2WIc54i9y3YwmAcJt uFA8fXLP/bT3qjTAJVNt8TZJ8A3H1FTA3f+ksHFSU1vcZeO4mvHxqIiKzz+UwMJRpBLQ WU4HZmhnCnuL0Q8EePSSGqDySBArt2iBrQP7/6+T9Efbx5WlaucWUhTys1kGarU2Ij2D HAKNfiyxxtYN6O9Kj/b8rvR8M75sEklZJ/eOALhjIX2iQisImE3L8gFlmgxNNioZkWw1 qNeg== Received: by 10.224.209.74 with SMTP id gf10mr23161100qab.8.1333550000133; Wed, 04 Apr 2012 07:33:20 -0700 (PDT) Received: from [192.168.200.5] (c-50-131-44-225.hsd1.ca.comcast.net. [50.131.44.225]) by mx.google.com with ESMTPS id eg9sm1323878qab.19.2012.04.04.07.33.18 (version=SSLv3 cipher=OTHER); Wed, 04 Apr 2012 07:33:19 -0700 (PDT) Message-ID: <4F7C5BAC.4090002@lerdorf.com> Date: Wed, 04 Apr 2012 07:33:16 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 MIME-Version: 1.0 To: Alan Knowles CC: internals@lists.php.net References: <4F7BABC8.7040904@akbkhome.com> <4F7BB90B.9040907@lerdorf.com> <4F7C1788.6080905@akbkhome.com> In-Reply-To: <4F7C1788.6080905@akbkhome.com> X-Enigmail-Version: 1.4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQmP057hNrXYAeEIA1SqMkpVfXnJP+iAYvYUAZyxBET0VWjOFF25WfNC+cwnrh4EUuKhGAWp Subject: Re: [PHP-DEV] Catchable - marking methods just like static? From: rasmus@lerdorf.com (Rasmus Lerdorf) On 04/04/2012 02:42 AM, Alan Knowles wrote: > Rather than this hap-hazard approach to ensuring code is correctly > handling error conditions would it not be far better for the engine to > be advising of situations where this may be occurring before they > occur.. in the same way undefined variables issue warnings. writing > code that throws exceptions should throw warnings if it's likely that it > is not handled. Well, I don't disagree with you. This is why we don't throw exceptions from the core of PHP. But I don't see how the engine can warn you about this case in any sort of compatible way that isn't likely to drive people crazy with warnings on perfectly valid code. -Rasmus