The following line of code throws an Exception:
HttpResponse response = client.execute(request); // actual HTTP request
I am able to catch it and print:
Log.e(TAG0, "Exception " + e.getMessage());
Which puts into LogCat:
03-03 14:52:11.965:
ERROR/TestHttpGet(786): Exception
http://www.google.com
Nice, but I don’t understand why the exception is thrown. All I did, prior to the line that throws the exception was:
HttpClient client = new DefaultHttpClient();
HttpGet request = new HttpGet();
request.setURI(new URI("http://www.google.com/"));
HttpResponse response = client.execute(request); // actual HTTP request
How do I progress from here?
Log.e(TAG, "Exception:", e)?