[python3-ldap] Feature requests: clearer errors
Michael Ströder
michael at stroeder.com
Wed Apr 16 23:27:54 CEST 2014
Christoph Zwerschke wrote:
> 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.
If you think this to the end the API has to double all possible exceptions to
be "fine-grained enough" and keep up with all the exceptions invented in the
future.
Ciao, Michael.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2398 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.python.org/pipermail/python3-ldap/attachments/20140416/a958bfae/attachment.bin>
More information about the python3-ldap
mailing list