3 ms·
I disagree entirely, but I'd love to hear your arguments (other than vague allusions to "popularity" and other languages). Improved checked exception handling
by elric 1y ago
I disagree entirely, but I'd love to hear your arguments (other than vague allusions to "popularity" and other languages).
Improved checked exception handling in Streams would be nice, but that's my only gripe with them. They force you to stop and think, which is a good thing.
There are some checked exceptions that should probably be unchecked, like UnsupportedEncodingException thrown by ByteArrayOutputStream::toString which takes a charset name. I'm sure there are other subclasses of IOException that could be an IllegalArgumentException instead. But those few inconveniences don't invalidate the concept of checked exceptions.
- peterashford 1y agoI'm 100% with you - Streams is the one area where I think they dont pay well. Everywhere else, they're fine
- seunosewa 1y agoWhich checked exceptions do you declare or enjoy having to handle in your codebase?
- peterashford 1y agoI declare any which I'm not handling at the point they're raised. Unless I'm just ignoring them in which case I just declare methods throw Exception.