+ } catch (JSONException e) {
+ mLatestResult = ResultType.INSTANCE_NOT_CONFIGURED;
+ Log.e(TAG, "JSON exception while trying connection (instance not configured) ", e);
+
+ } catch (SocketException e) {
+ mLatestResult = ResultType.WRONG_CONNECTION;
+ Log.e(TAG, "Socket exception while trying connection", e);
+
+ } catch (SocketTimeoutException e) {
+ mLatestResult = ResultType.TIMEOUT;
+ Log.e(TAG, "Socket timeout exception while trying connection", e);
+
+ } catch (MalformedURLException e) {
+ mLatestResult = ResultType.INCORRECT_ADDRESS;
+ Log.e(TAG, "Connect exception while trying connection", e);
+
+ } catch (UnknownHostException e) {
+ mLatestResult = ResultType.HOST_NOT_AVAILABLE;
+ Log.e(TAG, "Unknown host exception while trying connection", e);
+
+ } catch (SSLPeerUnverifiedException e) { // specially meaningful SSLException
+ mLatestResult = ResultType.SSL_UNVERIFIED_SERVER;
+ Log.e(TAG, "SSL Peer Unverified exception while trying connection", e);
+
+ } catch (SSLException e) {
+ mLatestResult = ResultType.SSL_INIT_ERROR;
+ Log.e(TAG, "SSL exception while trying connection", e);
+
+ } catch (ConnectTimeoutException e) { // timeout specific exception from org.apache.commons.httpclient
+ mLatestResult = ResultType.TIMEOUT;
+ Log.e(TAG, "Socket timeout exception while trying connection", e);
+
+ } catch (HttpException e) { // other specific exceptions from org.apache.commons.httpclient
+ mLatestResult = ResultType.UNKNOWN_ERROR;
+ Log.e(TAG, "HTTP exception while trying connection", e);
+
+ } catch (IOException e) { // UnkownsServiceException, and any other transport exceptions that could occur
+ mLatestResult = ResultType.UNKNOWN_ERROR;
+ Log.e(TAG, "I/O exception while trying connection", e);
+