Hacker News new | ask | show | jobs
by prance 3368 days ago
> Unfortunately, Sun decided that almost all Java errors must be recoverable, which results in lazy error handling like the above.

Not quite: Java insists that all (checked) Exceptions be handled or passed up explicitly. One can argue that this design decision is bad, as has been done extensively elsewhere.

However, in the particular example given, I'd argue that it would have made much more sense to display a user-understandable error message to the user (e.g. "Required gun resource file is missing, please re-download the game here: (...)"), and then just System.exit() if it's non-recoverable. Maybe print a stacktrace if the game was started in debug mode.