Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:17617 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61848 invoked by uid 1010); 8 Aug 2005 18:02:31 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 61830 invoked from network); 8 Aug 2005 18:02:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Aug 2005 18:02:31 -0000 X-Host-Fingerprint: 81.169.182.136 ajaxatwork.net Linux 2.4/2.6 Received: from ([81.169.182.136:41791] helo=strato.aixcept.de) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 8E/1D-04646-63E97F24 for ; Mon, 08 Aug 2005 14:02:30 -0400 Received: from [192.168.1.3] (dsl-082-083-243-003.arcor-ip.net [82.83.243.3]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by strato.aixcept.de (Postfix) with ESMTP id 8B6A335C379; Mon, 8 Aug 2005 20:21:23 +0200 (CEST) Date: Mon, 8 Aug 2005 20:02:27 +0200 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <1728251768.20050808200227@marcus-boerger.de> To: Derick Rethans Cc: Johannes Schlueter , internals@lists.php.net, , Sebastian Bergmann In-Reply-To: References: <42F7587B.6050901@schlitt.info> <200508081450.46458.johannes@php.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] type hinting throwing a fatal error From: helly@php.net (Marcus Boerger) Hello Derick, Monday, August 8, 2005, 3:00:50 PM, you wrote: > 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. Throwing a pure Exception is useless. Since it is the nature of Exception handling to code the reson into the Exception hierarchy. See my other reply and the comment on moving the exceptions to the engine. Best regards, Marcus