Skip to content

Update exception terminology to clarify types of exceptions#2954

Merged
kahgoh merged 8 commits into
exercism:mainfrom
Bahaaio:exceptions-terminology
Jun 20, 2025
Merged

Update exception terminology to clarify types of exceptions#2954
kahgoh merged 8 commits into
exercism:mainfrom
Bahaaio:exceptions-terminology

Conversation

@Bahaaio

@Bahaaio Bahaaio commented Jun 11, 2025

Copy link
Copy Markdown
Contributor

pull request

Clarify classification of exceptions and errors in Java introduction

This PR:

  • Distinguishes clearly between exceptions and errors
  • Clarifies that errors are not exceptions
  • Moves the section on errors into its own separate category

Reviewer Resources:

Track Policies

@jagdish-15

Copy link
Copy Markdown
Member

Hey @BahaaMohamed98,

Did you happen to discuss these changes on the Exercism forum before opening the PR?
If you’ve already created a topic, please share the link here. Otherwise, you should start a discussion there first and then proceed with the PR.

@Bahaaio

Bahaaio commented Jun 12, 2025

Copy link
Copy Markdown
Contributor Author

Hey @jagdish-15! You're right — I forgot to open a forum topic first 😅
I'll go ahead and create one now and link it here shortly. Thanks for the heads up!

@Bahaaio

Bahaaio commented Jun 12, 2025

Copy link
Copy Markdown
Contributor Author

Just created the discussion here: http://forum.exercism.org/t/clarifying-error-vs-exception-in-java-exception-concept/17914

@kahgoh kahgoh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @BahaaMohamed98, the general idea behind these changes seem reasonable to me. Since the content between the introduction and about are similar, I've added comments to just the introduction. If it helps, feel free to make update or make changes to just the introduction and we can update the other files later once we're happy.

Comment thread concepts/exceptions/introduction.md Outdated
This type of exception is checked at compile-time: methods that throw checked exceptions should specify this in their method signature, and code calling a method that might throw a checked exception is required to handle it or the code will not compile.

All exceptions in Java that do not inherit from `RuntimeException` or `Error` are considered checked exceptions.
All exceptions in Java that do not inherit from `RuntimeException` are checked exceptions.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should mention the Exception class somewhere since RuntimeException extends Exception.

Comment thread concepts/exceptions/introduction.md Outdated
All exceptions in Java that inherit from `RuntimeException` are unchecked exceptions.

### Errors
## Errors

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that Errors has been "promoted' to a level 2 heading, it looks like it sitting in between two Exception sections. I think it might flow better if this was moved after the Handling Exception section so that the entire Exception content was "together".

Comment thread concepts/exceptions/introduction.md Outdated
Comment on lines +39 to +40
Like unchecked exceptions, errors are not checked at compile-time and are not usually thrown from application code.
Unlike exceptions, Errors represent serious system-level problems that applications should generally not attempt to catch or handle.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion to emphasize the difference between unchecked exceptions and errors.

Suggested change
Like unchecked exceptions, errors are not checked at compile-time and are not usually thrown from application code.
Unlike exceptions, Errors represent serious system-level problems that applications should generally not attempt to catch or handle.
Like unchecked exceptions, errors are not checked at compile-time.
The difference is that they represent system level problems and are generally thrown by the Java Virtual machine or environment instead of the application.
Applications should generally not attempt to catch or handle them.

@kahgoh

kahgoh commented Jun 15, 2025

Copy link
Copy Markdown
Member

I notice the markdown linting is failing on a file you haven't changed. This can be fixed by merging the latest changes from the main branch.

@Bahaaio

Bahaaio commented Jun 15, 2025

Copy link
Copy Markdown
Contributor Author

Hi @kahgoh!

I’ve made the changes - You might want to review the wording in the first commit.
Should I update the other related files now, or leave that for later?

And should I add myself as a contributor?

@jagdish-15

Copy link
Copy Markdown
Member

And should I add myself as a contributor?

Yes, you’ve earned it!

@kahgoh

kahgoh commented Jun 16, 2025

Copy link
Copy Markdown
Member

Thanks @BahaaMohamed98, the updates to the introduction.md look good. Could you go ahead and update the other files to match?

@Bahaaio

Bahaaio commented Jun 16, 2025

Copy link
Copy Markdown
Contributor Author

Done!

@kahgoh kahgoh merged commit 2e0d76b into exercism:main Jun 20, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants