Re: type hinting throwing a fatal error

From: Date: Mon, 08 Aug 2005 13:00:50 +0000
Subject: Re: type hinting throwing a fatal error
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-17599@lists.php.net to get a copy of this message
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


Thread (125 messages)

« previous php.internals (#17599) next »