Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:9054 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 12806 invoked by uid 1010); 12 Apr 2004 10:42:13 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 12760 invoked from network); 12 Apr 2004 10:42:13 -0000 Received: from unknown (HELO jdi.jdimedia.nl) (212.204.192.51) by pb1.pair.com with SMTP; 12 Apr 2004 10:42:13 -0000 Received: from localhost (localhost [127.0.0.1]) by jdi.jdimedia.nl (8.12.10/8.12.10) with ESMTP id i3CAg82n008023; Mon, 12 Apr 2004 12:42:08 +0200 Date: Mon, 12 Apr 2004 12:41:55 +0200 (CEST) X-X-Sender: derick@localhost To: John Coggeshall cc: PHP Internals In-Reply-To: <1081740243.14476.11.camel@coogle.localdomain> Message-ID: References: <1081740243.14476.11.camel@coogle.localdomain> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] Exceptions and Errors From: derick@php.net (Derick Rethans) On Sun, 11 Apr 2004, John Coggeshall wrote: > As a matter of consistency, I would like to suggest that for those > extensions which have a OO/procedural syntax that the non-fatal errors > generated by those extensions be thrown as Exceptions when called from > an OO syntax. I have already committed such a change to Tidy, and I > can't see any serious reason why such a change can't be implemented for > internal classes. > > Feedback welcome. I think it's a stupid idea (actually OO is a stupid idea but that's something for another dicussion ;-): 1. In order to silently ignore failed queries you still have to put a stupid try..except block around it. 2. KISS: PHP is supposed to be SIMPLE; with all thos advanced OO stuff writing scripts for PHP starts becoming less and less easy. Sure, they are already using OO but that's just a notation. Some extensions are only OO, like DOM, but that doesn't mean that every Joe Average has any idea on what exceptions are. Please, kepe things simple. Don't force people. Derick