From: Michael E. <men...@ka...> - 2002-10-29 17:43:48
|
right - I guess was thinking more along the lines of directly in the=20 documentation on the ldap operations page, having a paragraph that says=20= "For the following methods, x(), y(), z(), ldap.LDAPError exceptions=20 are raised instead of returning error codes - click <a=20 href=3D"http://python-ldap.sourceforge.net/doc/python-ldap/node9.html=20 ">here</a> for more information on the Exceptions that can occur." In my case, I read through the exception page and didn't "get" that=20 delete_s doesn't return error codes because there is documentation=20 like this mixed into the LDAP operations page for say the result()=20 method: The result() method returns a tuple of the form (result-type,=20 result-data). The first element, result-type is a string, being one of:=20= 'RES_BIND', 'RES_SEARCH_ENTRY', 'RES_SEARCH_RESULT', 'RES_MODIFY',=20 'RES_ADD', 'RES_DELETE', 'RES_MODRDN', or 'RES_COMPARE'. (The module=20 constants RES_* are set to these strings, for your convenience.) This method does return codes and it seems to me that based on that if=20= it's not explicitly stated that other methods would as well. =20 Personally I would like to see the documentation have examples for each=20= function written in python but I doubt anyone has time for that. I'll=20= start collecting mine and maybe put them up somewhere. Mike On Tuesday, October 29, 2002, at 12:28 PM, Michael Str=F6der wrote: > Michael Engelhart wrote: >>> Thanks to the early design decision of David you don't have to do=20 >>> error handling by checking result codes. If an error occurs during=20= >>> deletion of an entry an exception of class ldap.LDAPError or a=20 >>> derived error class is raised. >> maybe that little tidbit should be in the documentation somewhere? > > http://python-ldap.sourceforge.net/doc/python-ldap/node9.html > > Ciao, Michael. > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Python-LDAP-dev mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/python-ldap-dev > |