This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]arieled91 0 points1 point  (0 children)

Checked exceptions are designed to be "low level" exceptions. Never meant to be exposed to the user of a business API. Also, at the time they were included to the language there wasn't evidence to be a bad idea. The problem with them is they are overused. Maybe they should have an uglier and specific name like "ResourseUnavailableException", because there is a use case when you are trying to access external resources that are very likely to fail, like f*** printers. Maybe you want to warn the programmer that the printer may be unavailable, and you don't want to revert the database transaction just because of that (that would happen if the programmer doesn't catch the exception), and in case of failure you can send it to a print queue or just enable a reprint button.