Hi all,
While going through the Java exceptions concept, I noticed that Error was listed alongside checked and unchecked exceptions as a type of Exception.
From what I understand, Error is not a subclass of Exception, but a separate subclass of Throwable. Although it behaves like an unchecked exception in terms of compile-time checks, grouping it under “types of exceptions” might be a bit confusing for learners.
I opened a small PR to help clarify this:
- Removes
Errorfrom the list of exception types - Moves it to its own section below
- Clarifies the difference in wording to reflect the type hierarchy more accurately
PR: (#2954)
I’m open to any feedback or corrections if I misunderstood something!
Thanks!