ldap_set_lderrno() -- Set Error Information
Syntax
#include <ldap.h> int ldap_set_lderrno( LDAP *ld, int error, const char *dn, const char *errmsg )
Default Public Authority: *USE
Library Name/Service Program: QSYS/QGLDCLNT
Threadsafe: Yes
The ldap_set_lderrno() function sets an error code and other information about an error in the specified LDAP structure.
Authorities and Locks
No IBM® i authority is required.
Parameters
- ld
- (Input) Specifies the LDAP pointer returned by a previous call to ldap_init(), ldap_ssl_init(), or ldap_open().
- error
- (Input) The LDAP error code to be set in the ld.
- dn
- (Input) The distinguished name (DN) that identifies an existing entry. Normally, it is used to indicate how much of the name in the request is recongnized by a server on an LDAP_NO_SUCH_OBJECT error. However, in this case since it is an input to this API it should be a DN consistent with the error and errmsg parameters input on this API.
- errmsg
- (Input) The text of the error message, as if returned from a server.
Return Value
- LDAP error code
- See LDAP Client API Error Conditions for possible LDAP error codes values.
Error Messages
The following message may be sent from this function.
Message ID | Error Message Text |
---|---|
CPF3CF2 E | Error(s) occurred during running of ldap_set_lderrno API. |
Related Information
- ldap_err2string() -- Convert LDAP error indication to a string.
- ldap_perror() -- Print an LDAP error indication to standard error.
- ldap_get_errno() -- Obtain information from most recent error.
- ldap_get_lderrno() -- Retrieve Error Information
- ldap_result2error() -- Extract LDAP error indication from LDAP result.
API introduced: V5R1
[ Back to top | LDAP APIs | APIs by category ]