-
-
Notifications
You must be signed in to change notification settings - Fork 708
Update exception terminology to clarify types of exceptions #2954
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Update exception terminology to clarify types of exceptions #2954
Conversation
Hey @BahaaMohamed98, Did you happen to discuss these changes on the Exercism forum before opening the PR? |
Hey @jagdish-15! You're right — I forgot to open a forum topic first 😅 |
Just created the discussion here: http://forum.exercism.org/t/clarifying-error-vs-exception-in-java-exception-concept/17914 |
There was a problem hiding this comment.
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.
concepts/exceptions/introduction.md
Outdated
@@ -21,7 +20,7 @@ An example of a checked exception is the `FileNotFoundException` which occurs wh | |||
|
|||
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. |
There was a problem hiding this comment.
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
.
concepts/exceptions/introduction.md
Outdated
|
||
### Errors | ||
## Errors |
There was a problem hiding this comment.
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".
concepts/exceptions/introduction.md
Outdated
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. |
There was a problem hiding this comment.
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.
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. |
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. |
Hi @kahgoh! I’ve made the changes - You might want to review the wording in the first commit. And should I add myself as a contributor? |
Yes, you’ve earned it! |
Thanks @BahaaMohamed98, the updates to the |
Done! |
pull request
Clarify classification of exceptions and errors in Java introduction
This PR:
Reviewer Resources:
Track Policies