4 ms·
Unless the language does that for you (both enforcing it, and providing tools to make it absolutely trivial), it will never happen, it's just way too much overh
by masklinn 3y ago
Unless the language does that for you (both enforcing it, and providing tools to make it absolutely trivial), it will never happen, it's just way too much overhead to have to define a new exception for every method in an interface, then a sub-exception for every method in the implementation of that interface, then go through the internal conversions from the underlying exceptions to the parent one.
People can't be arsed to do that in Rust where there's ways to abstract over those things and macros to define them.
If that's the route you assert is necessary, you need something like Zig's errors.
- necovek 3y agoWhat you are saying is that people can't be arsed to do proper error checking, which is absolutely true. Making a sane hierarchy of exceptions is the smaller of the problems of actually handling them everywhere.