The ->error method will return any error string that the server returned.
Sadly there is no requirment that they put anything in there, so for
many servers it is empty :(
Net::LDAP::Util does provide two subs for converting the error code
to a name or description.
use Net::LDAP::Util qw(ldap_error_name ldap_error_text);
print ldap_error_name($mesg->code),"\n";
print ldap_error_text($mesg->code),"\n";
Graham.
On Thu, Aug 17, 2000 at 12:34:36AM -0700, ms...@ma... wrote:
> hi folks,
>
> consider the following code fragment:
>
> my($result) = $ldap->add(dn=>...,attr=>...);
> print $result->code, $result->error;
>
> ok, the code got displayed, (some number, 65 for me this time, but nothing from error). i assume anything other than 0 should be some sort of problem. but how do i lookup what these numbers mean (for error handling)? specifically, pls show me how to use Constant package, if that is the way to go. thanx a lot.
|