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
GEODE-6796: Specially-handle UnknownHostException in jmxConnect() #3622
Conversation
@metatype commented (on dev list) "I don’t agree that adding the exception class name creates a better user experience." |
Only in this case, it probably does offer more information if the message itself has typo's that doesn't make any sense. Another way to fix this is to check if the message itself has "nor servname" string, if so, give it another message that makes sense. |
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.
Oh, I think there is a better solution here, in StartLocatorCommand
, you can catch the UnknownHostException
specifically and provide a more sensible error message, and the leave the general exception catch block the same as before.
@jinmeiliao What qualifies as "more sensible"? If we are not going to print the exception's message, then we lose the information about exactly what hostname was not found... Do any of these look better? #1 (generic) #2 (Safari) #3 (golang) #4 (Chrome) #5 (Firefox) #6 (Zero Wing) #7 (2001 A Space Odyssey) |
PR has been updated to revert the first approach and go with option #4 instead. Now the user will see: |
…ache#3622) * GEODE-6796: specially-handle UnknownHostException in jmxConnect
For all changes:
Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?
Has your PR been rebased against the latest commit within the target branch (typically
develop
)?Is your initial contribution a single, squashed commit?
Does
gradlew build
run cleanly?Have you written or updated unit tests to verify your changes?
If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
Note:
Please ensure that once the PR is submitted, check Concourse for build issues and
submit an update to your PR as soon as possible. If you need help, please send an
email to dev@geode.apache.org.