Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62773 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 75754 invoked from network); 3 Sep 2012 23:39:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Sep 2012 23:39:40 -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.212.42 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 209.85.212.42 mail-vb0-f42.google.com Received: from [209.85.212.42] ([209.85.212.42:48160] helo=mail-vb0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FB/EF-20751-BBF35405 for ; Mon, 03 Sep 2012 19:39:39 -0400 Received: by vbbfs19 with SMTP id fs19so6347566vbb.29 for ; Mon, 03 Sep 2012 16:39:36 -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=SU89hIWaSUY8fHL/6/THoHfZ7Qn/cZ1uQOSQwqKvA8U=; b=TBBRUXpAF+zwsUIYbxAs1QUL9P0IPW09dvMa8kklOZgzxOnuOuEUai+2hiRBa28aKT zUeWhunPyT3CKemQaS4OYxtKTb1IsWw6jq0q1pfdVbVZyTPLS4VW57L7FdUqImuQu8et ToIeMEyrm+UzThcBZZxSnPGz8IT0DolTGlCFVLxuQGu77auK0gJnZDo99kKHe8zK7c7h MZr+iNUTVmF4vbPWVx2NFK3HgOmpQaZJnic0QUtDyN8VDE2HYZQLaJ6fs8wu0jeGkx3D fPxQ+YL264qyCZPN3Qa+Unf3MIQHE6fOMxq6E7tOE8v/6X2lmnpx8CKl/ZPBrSqWHanO wRwQ== Received: by 10.58.196.174 with SMTP id in14mr14313125vec.18.1346715576468; Mon, 03 Sep 2012 16:39:36 -0700 (PDT) Received: from [192.168.200.148] (c-50-131-44-225.hsd1.ca.comcast.net. [50.131.44.225]) by mx.google.com with ESMTPS id k2sm6276127vdf.15.2012.09.03.16.39.34 (version=SSLv3 cipher=OTHER); Mon, 03 Sep 2012 16:39:35 -0700 (PDT) Message-ID: <50453FB4.3070606@lerdorf.com> Date: Mon, 03 Sep 2012 16:39:32 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120827 Thunderbird/15.0 MIME-Version: 1.0 To: Alex Aulbach CC: Gustavo Lopes , internals@lists.php.net References: <5040DC47.8000305@ajf.me> <5040F4D9.80206@sugarcrm.com> <5042946A.80204@sugarcrm.com> <5042A7D6.7050001@lerdorf.com> <50452713.3020307@sugarcrm.com> In-Reply-To: X-Enigmail-Version: 1.4.4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQkhB431tQeyHJzP4Z7xNe9hGYVcvXvcy+P4X0eu9a0k6uuP+g+Fjhi1UnOkyfnym9JWlSxD Subject: Re: [PHP-DEV] Re: Are exceptions allowed in php core? From: rasmus@lerdorf.com (Rasmus Lerdorf) On 09/03/2012 04:31 PM, Alex Aulbach wrote: > 2012/9/4 Gustavo Lopes : >>> Following this logic, we'd have to convert all E_NOTICE and E_STRICT to >>> fatal errors or exceptions - they are usually produced by programming >>> errors and aren't meant to be caught by surrounding code (actually, >>> can't). But I don't see anybody benefiting from this - as I don't see >>> anybody benefiting from generator that will explode your application if >>> you touch it twice. > > Nobody is forced to handle an notice-exception like a fatal exception. > A notice-exception can be created write something into an error-log > and tells PHP not to handle it any more (destroys itself). Could be > all done in the construction of the exception. > First, you got the quoting wrong. Please be more careful with that. And second, huh? Uncaught exceptions are by definition fatal. There is no such thing as a notice exception. If we go down that road refer to my email describing condition error systems. Longer term I think a condition system would make a lot of sense for PHP, but we definitely don't want to introduce some sort of bastard non-fatal exception. -Rasmus