I’m hoping this is an appropriate place to get some feedback on a pending pull request I have on rails/rails: https://github.com/rails/rails/pull/10828
Copied from the PR:
I found my self in a situation today where I wanted to rescue from a delegate exception where the object I was delegating to was nil. Right now this throws a standard RuntimeError
with a detailed message, which is great, but in this case I didn’t want to rescue from other exceptions. I think adding this simple DelegationError
class would make working with these exceptions a bit cleaner.
I hope others find this valuable. Feedback welcome!