Re: PEAR::Auth how to debug?
| From: | Dio Brando | Date: | Sat, 29 Apr 2006 19:57:22 +0000 |
| Subject: | Re: PEAR::Auth how to debug? | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-23892@lists.php.net to get a copy of this message | ||
Thank you, it work well!
Dio.
Justin Patrin wrote:
> On 4/29/06, Dio Brando <diobrando@bmlabs.net> wrote:
>> Hi,
>> this is the first time that I 'm using pear. Someone can tell me
>> how to do to have a debug report from a package like PEAR:Auth. For
>> example if PEAR:Auth can't connect to mysql db, how I have to do for
>> have a warning or anythink instead of a "Wrong login" and stop? Thanks.
>>
>
> Try looking into PEAR::setErrorHandling(). Something like this is
> usually very helpful:
>
> function pe($err) {
> die($err->getMessage().' '.$err->getUserInfo());
> }
> PEAR::setErrorHandling(PEAR_ERROR_CAlLBACK, 'pe');
>
> --
> Justin Patrin
>