If isReachable throws an IOException in Java, what is the right step to do and why?
Go to solution
Solved by Sauron,
Read the documentation: https://docs.oracle.com/javase/1.5.0/docs/api/java/net/InetAddress.html#isReachable(int)
QuoteThrows:
IOException - if a network error occurs
so all you can know of the exception is that there was a network error. This is what you should write in your debug message. Depending on what you're trying to do it could be useful to add information on which connection failed with this error.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now