Closed Blacksmoke16 closed 1 week ago
I'm not sure about LogicError
. It's a pretty substantial piece. So far it's only been mentioned in https://github.com/crystal-lang/crystal/issues/11639#issuecomment-2090480502 before. We haven't had much of a conclusive discussion about (re-)shaping the error hierarchy tree. I'm not principally opposed and it seems to makes sense, but we should probably look a bit more at the bigger picture and alternative options.
It's hard to do much in regards to changing up the current hierarchy due to needing to avoid breaking changes. At least from a large overhaul perspective. I think #14553 enables some possibly good opportunities in that we're not bound by inheritance. E.g. allow rescuing classes of exceptions w/o needing them all to share a common parent type.
Definitely open to other thoughts, which we can continue discussing in #11639. In the meantime, I'll go ahead and close this. Can always re-open if needed.
Extracted from #14737.
Excluded
NotImplementedError
from inheriting fromLogicError
, but includedIndexError
andKeyError
.