We need to rescue some exceptions, but because there is only one LdapError-class, we cannot rescue one specific behavior.
So i wrote this patch for using many LdapError-classes but specific exceptions.
All of these exceptions has LdapError as base-class, so it do not break any exception handling.
One LdapError-class => Specific errors for every exception.
Really like this idea but
@jch @schaary what are your thoughts on this PR?
👍 I dig it. Since the exception classes inherit from a common base class Net::LDAP::LdapError, it gives the caller the option to either rescue for a specific error, or to rescue the general one.
While we're here, how do you guys feel about renaming Net::LDAP::LdapError to Net::LDAP::Error? That capitalization bugs me. We can easily add a deprecation notice and alias the old constant for backwards compatibility until the next major version release.
It looks like you discover a little treasure under the heap of PRs ;)
+1 for renaming Net::LDAP::LdapError to Net::LDAP::Error
@DenisKnauf 👍 for proposing this PR. Sorry it took us so long to get to it, but would you be interested in updating it to merge cleanly with master?
@DenisKnauf any chance you'd like to merge in master and fix conflicts for this? Would really like to get your change merged in!
At the moment, i haven't Internet, so i can't.
Next month it should be possible.
@DenisKnauf alternatively, you can add me to your fork as collaborators and I can do it for you! :)
@DenisKnauf any chance you'll have a moment to fix this? Would love to merge it!
I and my colleagues have been looking forward to this changes on LdapError 👍
Unfortunately @DenisKnauf seems be not able to have a time to fix the conflict.
I have an idea to take over his work, creating new pull request base on a branch into which @DenisKnauf 's master are merged with the current HEAD of this repo's master, of course resolving the conflict.
@mtodd @jch how do you think the idea?
@satoryu like @DenisKnauf, I too have not had time to fix this. I'd love for you to take this over and get it to a point where we can merge it! 👍
Closing in favor of #183