4 ms·
I think the real problem is that the "rethrow as unchecked" case is probably the most common, but is clunky and verbose. A more ergonomic way to do that would
by wtetzner 8y ago
I think the real problem is that the "rethrow as unchecked" case is probably the most common, but is clunky and verbose.
A more ergonomic way to do that would probably make people stop complaining so much.
This problem is especially noticeable when using lambdas. If you're implementing an interface that doesn't have a throws clause, but the body calls something that throws a checked exception, you _have_ to introduce a try/catch to your lambda body. You don't get to re-throw it without wrapping it in a RuntimeException.