Hacker News new | ask | show | jobs
by ignoramous 473 days ago
> In Javaland this describes assertions, and the term exception is for operating errors, i.e. problems not necessarily attributable to programmer error

Making matters more confusing in Javaland, Errors are separate from Exceptions, but both are Throwables.

  An Error is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch. Most such errors are abnormal conditions. The ThreadDeath error, though a "normal" condition, is also a subclass of Error because most applications should not try to catch it.
https://docs.oracle.com/javase/8/docs/api/java/lang/Error.ht... / https://archive.vn/i5F7B
2 comments

This reminds me of one of my favorite SO answer-rants that reads like an angry Dr. Seuss rhyme: https://stackoverflow.com/a/36627158

> Which of these are the "checked" exceptions? Throwables are checked exceptions, except if they're also Errors, which are unchecked exceptions, and then there's the Exceptions, which are also Throwables and are the main type of checked exception, except there's one exception to that too, which is that if they are also RuntimeExceptions, because that's the other kind of unchecked exception.

And this reminds me of a wonderful parody blog post - https://steve-yegge.blogspot.com/2006/03/execution-in-kingdo...
This is brilliant, thanks for sharing.
Errors are not checked, the assumption being that most of the time you can’t do anything about them anyway.