[refactoring] improve handling exceptions#10068
Merged
diemol merged 2 commits intoSeleniumHQ:trunkfrom Dec 8, 2021
asolntsev:improve-exception-handling
Merged
[refactoring] improve handling exceptions#10068diemol merged 2 commits intoSeleniumHQ:trunkfrom asolntsev:improve-exception-handling
diemol merged 2 commits intoSeleniumHQ:trunkfrom
asolntsev:improve-exception-handling
Conversation
pujagani
reviewed
Nov 22, 2021
diemol
reviewed
Nov 23, 2021
diemol
requested changes
Dec 2, 2021
| private String pathToServlet; | ||
| private String browserStartCommand; | ||
| private String browserURL; | ||
| private final String browserStartCommand; |
Member
There was a problem hiding this comment.
Can you please revert changes to files in the thoughtworks package? This is legacy code and we will eventually phase out RC.
Contributor
Author
There was a problem hiding this comment.
ok, I will revert.
Contributor
Author
There was a problem hiding this comment.
@diemol Done (reverted changes in com.thoughtworks package).
* throw "new UncheckedIOException(ioe)"" instead of just "new RuntimeException(ioe)" * avoid catching too broad Exception which causes unneeded re-wrapping of RuntimeExceptions
.. as it's deprecated and will be removed anyway.
|
SonarCloud Quality Gate failed. |
diemol
approved these changes
Dec 8, 2021
elgatov
pushed a commit
to elgatov/selenium
that referenced
this pull request
Jun 27, 2022
* [refactoring] improve handling exceptions * throw "new UncheckedIOException(ioe)"" instead of just "new RuntimeException(ioe)" * avoid catching too broad Exception which causes unneeded re-wrapping of RuntimeExceptions * revert changes in com.thoughtworks package .. as it's deprecated and will be removed anyway.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.









Description
it's just a small refactoring: improving some of "catch Exception" blocks.
P.S. Replacing RuntimeException by UncheckedIOException doesn't explicitly solve any practical problem, it's just a better exception for wrapping IOException.
You Many coding standards recommend to avoid throwing too generic exceptions like
RuntimeExceptionorException. AndUncheckedIOExceptionis exactly for that: it's a "RuntimeException for wrapping IOException".Types of changes
Checklist