[python3-ldap] Feature requests: clearer errors

Christoph Zwerschke cito at online.de
Wed Apr 16 22:40:20 CEST 2014


Am 16.04.2014 21:46, schrieb Joseph L. Casale:
>> I think re-raising as a subclass of LDAPException is better,
>> because you cancatch every problem with a single exception handler.
>> This is also how Requests and urllib do it. It's also important
>> that all possible exceptions  are properly documented.
>
> Just my opinion but I disagree with that. You can't know my use case
>  and if you trap an exception my scenario requires that yours
> doesn't, what am I to do?

Actually I don't see a problem here if the LDAPException subclasses 
re-raised by python3-ldap are fine-grained enough. Remember that 
exceptions are part of the API. The fact that python3-ldap uses the 
stdlib socket module is IMHO an implementation detail and python3-ldap 
should encapsulate that.

-- Christoph



More information about the python3-ldap mailing list