unknown error

David Leonard david.leonard at csee.uq.edu.au
Thu Jun 7 01:44:09 CEST 2001


Um, the whole point of LDAP_TYPE_IS_OPAQUE is that ld_errno is just not there.
i.e. the C header files just don't mention ld_errno, and we can't guess
where it is.

However, I recall that there are other (non-standard) APIs to get to
the error code.. something like ldap_get_error(LDAP *) which we could use.


On Wed, 6 Jun 2001, David Margrave typed thusly:

>
>     self.ldapconn.modify_s(self.dn, modlist)
> ldap.LDAPError: unknown error (C API does not expose error)
>
> This was from the latest packaged release (1.10a3 i think)
>
> Maybe we could make the exception for unknown errors include the numeric
> error code:
>
> #ifdef LDAP_TYPE_IS_OPAQUE
>         else {
>                 PyErr_SetString(LDAPexception_class,
>                         "unknown error (C API does not expose error
> %d)", l->ld_errno);
>
>                 return NULL;
>         }
> #else
>
> My $.02

-- 
David Leonard                           David.Leonard at dstc.edu.au
CRC For Distributed Systems Technology  Room:78-632  Ph:+61 7 336 58358
The University of Queensland            http://www.dstc.edu.au/
QLD 4072  AUSTRALIA                     B73CD65FBEF4C089B79A8EBADF1A932F13EA0FC8

EERROR - Erroneous error. Nothing wrong.





More information about the python-ldap mailing list