Skip to content
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

Exception for connectivity issues too vague. #31

Open
GoogleCodeExporter opened this issue May 4, 2015 · 0 comments
Open

Exception for connectivity issues too vague. #31

GoogleCodeExporter opened this issue May 4, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

*What steps will reproduce the problem?
1. Remove Internet Connectivity
2. Attempt to invoke com.google.code.geocoder.Geocoder.geocode(...)

*What is the expected output? What do you see instead?
There is a stack trace for the java.net.UnknownHostException that is dumped to 
the console.  However, at the level of my code where I am calling the 
geocode(...) method, the only exception I am able to catch is a 
java.lang.NullPointerException.  This makes it difficult to handle the issue 
gracefully since NPE is such a generic error. At that level, it could be 
connectivity, or any number of other things.  

I would like to be able to advise my user of the lack of connectivity, so it 
can be remedied. It would also be handy to provide them the domain which 
accompanies the UnknownHostException (in this case, maps.googleapis.com) 
dynamically. At this point, I had to hard code info that into my catch 
statement of the NullPointerException.

*What version of the product are you using? On what operating system?
I am using geocoder-1.0.0.jar on Windows XP / Eclipse Helios / JRE 6.0

*Please provide any additional information below.
None, but if more information is needed, I can provide it.

Original issue reported on code.google.com by james.hy...@gmail.com on 26 Apr 2013 at 4:02

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant