Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:32845 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 97874 invoked by uid 1010); 18 Oct 2007 07:45:54 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 97858 invoked from network); 18 Oct 2007 07:45:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Oct 2007 07:45:54 -0000 Authentication-Results: pb1.pair.com header.from=tony@daylessday.org; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tony@daylessday.org; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain daylessday.org designates 89.208.40.236 as permitted sender) X-PHP-List-Original-Sender: tony@daylessday.org X-Host-Fingerprint: 89.208.40.236 mail.daylessday.org Linux 2.6 Received: from [89.208.40.236] ([89.208.40.236:49807] helo=daylessday.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CC/C0-23754-03F07174 for ; Thu, 18 Oct 2007 03:45:53 -0400 Received: from [192.168.3.60] (unknown [212.42.62.198]) by daylessday.org (Postfix) with ESMTP id 70468640163; Thu, 18 Oct 2007 11:45:49 +0400 (MSD) Message-ID: <47170F2C.3070709@daylessday.org> Date: Thu, 18 Oct 2007 11:45:48 +0400 User-Agent: Thunderbird 2.0.0.6 (X11/20070801) MIME-Version: 1.0 To: Lukas Kahwe Smith CC: PHP Developers Mailing List References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] exception policy for core From: tony@daylessday.org (Antony Dovgal) On 17.10.2007 20:09, Lukas Kahwe Smith wrote: > Hi, > > I remember that we discussed the question of exception throwing from > core in the very early days of php 5, when the suggestion of turning > all errors into exceptions first came up. I remember that we decided > that exceptions should only be thrown from core on constructor errors > by default. Along the lines of PDO, extensions could allow users to > explicitly enable an exception mode. First of all, I have to say that I see nothing wrong in using exceptions. Second, I see nothing wrong in using exceptions _in OO extensions_. And finally, I don't like the idea of having a special function in each and every extension to control it's error level. PDO was built this way from the very beginning, but making this some kind of standard would be a mistake IMO. You may not like exceptions, but that doesn't make them less useful. > This popped up again as I picked up on IRC that the imagick extension > is quite exception throwing happy. I do realize that this is a pecl > extension, so maybe core rules do not apply (core<->pecl relations > should also be addressed ASAP if you ask me). > > Anywas, am I remembering things correctly? Is this still our policy? > If not do we have (want?) a policy? While I agree that there should be some kind of recommendations/standards, IMO they should not include such a clause. -- Wbr, Antony Dovgal