*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
Original issue reported on code.google.com by
james.hy...@gmail.com
on 26 Apr 2013 at 4:02