Re:Java’s Checked Exceptions Are Evil? (2015)
by bluejekyll on Monday September 24, 2018 @09:53AM
(#18057658)
Again I go back to InterruptedException, this advice is very wrong in that context, and similarly others.
People often make the very big mistake of generically catching Throwable and then rewrapping that, which would include all Error types. Those should must be rethrown without wrapping. I don’t think you meant to imply that, but it’s easy to overapply advice like this.
This! Throw as many RuntimeExceptions as you like, so long as you include the originating exception.