Re: Re: exceptions, errors, and documentation

From: Date: Tue, 08 Jun 2004 19:10:18 +0000
Subject: Re: Re: exceptions, errors, and documentation
References: 1 2 3 4  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-30204@lists.php.net to get a copy of this message
Tomas V.V.Cox wrote:
Daniel Convissor wrote:
On Tue, Jun 08, 2004 at 05:26:25PM +0200, Michael Wallner wrote:
* @return    mixed    Returns true on success or PEAR_Error on failure.
The data type should be the one expected under normal circumstances. So, in this case "bool." Errors should be a rare occurance.
IMHO is better to set "mixed", so it's clear that you have to check for errors on "datatype" instead of "datavalue".
@ return bool|PEAR_Error MUCH clearer. Mixed is a bit vague, we don't want people thinking we return cash money prizes as well as a PEAR_Error. Greg

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