Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46571 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85045 invoked from network); 30 Dec 2009 14:30:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Dec 2009 14:30:54 -0000 X-Host-Fingerprint: 188.62.49.6 6-49.62-188.cust.bluewin.ch Received: from [188.62.49.6] ([188.62.49.6:3139] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 67/B7-30992-C146B3B4 for ; Wed, 30 Dec 2009 09:30:53 -0500 Message-ID: <67.B7.30992.C146B3B4@pb1.pair.com> To: internals@lists.php.net Date: Wed, 30 Dec 2009 15:30:49 +0100 User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 References: <4B3B50C2.8080500@cschneid.com> In-Reply-To: <4B3B50C2.8080500@cschneid.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Posted-By: 188.62.49.6 Subject: Re: Errors, Exceptions et al From: hp@oeri.ch (Hans-Peter Oeri) Hi! Christian Schneider wrote: > leads to another inconsistency: Depending on the hosting provider and/or > frameworks/modules used you'd have to write different error handlers. I understand there are widely differing applications for php, that's why I think backwards-compatibility and common defaults across installations is a must. Changing defaults system-wide is always risky. In a shared-hosting situation, the proposed error defaults *must not* be changed, of course. However, there are also many single-hosted applications that could benefit greatly from configurability. And note I don't only write pro global-configurability, but also object-wise, like: $T = new TranslationReader(...); // say, on error, $a gets set to NULL, no error issued $a = $T->get('nonexisting'); // change that behaviour for $T ONLY $T->setErrorBehaviour( ERROR_THROW ); try { // if ANY error in $T occurs, a corresponding exception is caught [read many many translation strings] } catch( Exception $e ) {} > One of the nice things about PHP it's easy to learn and knowledge & code > is (most of the time) transferable amongst different instances of PHP. And that's how it shall always be. I believe it should even give more structure in a field where extensions currently fragment and render php more complicated than it had to be. Regards HPO