PR: Fix Error in java exceptions concept

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 Error from the list of exception types
  • Moves it to its own section below
  • Clarifies the difference in wording to reflect the type hierarchy more accurately

:link: PR: (#2954)

I’m open to any feedback or corrections if I misunderstood something!

Thanks!

@kahgoh, you might wanna take a look at this when possible!

I think the idea seems reasonable since Errors are different to Exceptions in the way described by @BahaaMohamed98. I’ve just had added a few minor comments to the PR.

3 Likes