Re: Raising errors inside a constructor

From: Date: Sun, 15 Aug 2004 21:52:12 +0000
Subject: Re: Raising errors inside a constructor
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-32695@lists.php.net to get a copy of this message
Olivier Guilyardi wrote:
I don't see the point with being forced to make factory methods, only because there's no way to raise an error from the constructor. What do you think of these inherited methods : hasError() and popError() ?
I see no point in creating an object instance if it isnt needed anyways or add some hack. For php5 you can raise an exception to get rid of the hack. regards, Lukas

« previous php.pear.dev (#32695) next »