Re: Re: exceptions, errors, and documentation
| From: | Bertrand Mansion | Date: | Tue, 08 Jun 2004 17:13:16 +0000 |
| Subject: | Re: Re: exceptions, errors, and documentation | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-30185@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".
IIRC, PHPDocumentor supports
@return bool|PEAR_Error
which is even clearer.
Bertrand Mansion
Mamasam