All in all, JNDI's exception system is pretty decent, and I think we
should mimic it, but without implementing or extending the JNDI classes
(something ADS is doing, and it collides with the renaming of DN, as
it's not anymore a NAME extension).
thoughts ?
I agree that a exception hierarchy with a base LdapExcepton class makes
sense.
+1 too
One important thing is to add the result code to the exception. In JNDI
you have to extract it from the exception message.
Another thing I don't like with JNDI is the handling of referrals and
search continuations. I think for referrals it makes sense to throw an
exception. But for search continuations we shouldn't throw an exception
but a SearchResultReference object should be returned.
I also wonder if we need to generate an exception for all the result
messages. For example for an timeLimitExceeded or sizeLimitExceeded or
adminLimitExceeded result I think it is not necessary, the user can just
check the result code if s/he wants to handle that case.
from the recent experience of migrating test cases to client-api
have observed that unlike jndi we return result codes and I liked this
(the jndi exceptions rather give me a feeling like 'use exceptions for
control flow', which is considered as a bad practice by many)
so +1 for returning result codes instead of exceptions
Kiran Ayyagari