Re: Net_LDAP & Exceptions
| From: | Jan Wagner | Date: | Tue, 13 Sep 2005 14:58:47 +0000 |
| Subject: | Re: Net_LDAP & Exceptions | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-20939@lists.php.net to get a copy of this message | ||
Am Montag, den 12.09.2005, 19:31 -0400 schrieb Jeff Loiselle:
> Does Net_LDAP work for PHP4 as well as PHP5? I can't find this
> information anywhere within the package or on the PEAR site. When I
> purposely send bad credentials and check for error, I can't seem to trap
> it as it is throwing Exceptions. Is this really an Exception? Is there a
> way to trap these errors?
>
> // BIND TO LDAP SERVER
> $ldap = Net_LDAP::connect($config);
> if (Net_LDAP::isError($ldap)) {
> print 'error';
> exit;
> }
> Warning: PEAR_ERROR_EXCEPTION is obsolete, use class PEAR_ErrorStack for
> exceptions in /usr/share/pear/PEAR.php on line 862
>
Hmmh,
I dont know about Net_LDAP using exceptions. Which php/pear/net_ldap
combination are you running? To me it seems PEAR throws the Exception as
the class should return only Net_LDAP_Errors (looks like that in your
backtrace).
Jan