Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:17599 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92128 invoked by uid 1010); 8 Aug 2005 13:00:56 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 92113 invoked from network); 8 Aug 2005 13:00:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Aug 2005 13:00:56 -0000 X-Host-Fingerprint: 82.94.239.5 jdi.jdi-ict.nl Linux 2.5 (sometimes 2.4) (4) Received: from ([82.94.239.5:33231] helo=jdi.jdi-ict.nl) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id B4/7A-04646-78757F24 for ; Mon, 08 Aug 2005 09:00:55 -0400 Received: from localhost (localhost [127.0.0.1]) by jdi.jdi-ict.nl (8.12.11/8.12.11) with ESMTP id j78D0q5V012558 for ; Mon, 8 Aug 2005 15:00:52 +0200 Received: from localhost (localhost [127.0.0.1]) by jdi.jdi-ict.nl (8.12.11/8.12.11) with ESMTP id j78D0oZe012544; Mon, 8 Aug 2005 15:00:51 +0200 Date: Mon, 8 Aug 2005 15:00:50 +0200 (CEST) X-X-Sender: derick@localhost To: Johannes Schlueter cc: internals@lists.php.net, tobias@schlitt.info, Sebastian Bergmann In-Reply-To: <200508081450.46458.johannes@php.net> Message-ID: References: <42F7587B.6050901@schlitt.info> <200508081450.46458.johannes@php.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at jdi-ict.nl Subject: Re: [PHP-DEV] type hinting throwing a fatal error From: derick@php.net (Derick Rethans) On Mon, 8 Aug 2005, Johannes Schlueter wrote: > On Monday 08 August 2005 15:04, Tobias Schlitt wrote: > > > The throw an Exception when SPL disabled and an InvalidArgumentException > > > when it is enabled. > > > > That's senseless when writing applications that shall be version > > independant. Just sticking to Exception should be fine. > > No it is not, in your application you can still simply catch Exception to be > independent of SPL since the InvalidArgumentException class extends the > Exception class. Throwing two different kinds of Exceptions is evil. It should be consistent, not relying on an external component for it's exceptions. So it will be a normal Exception. This is a useles branch of this tread - and it should end now. Derick -- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org