Example usage for javax.net.ssl SSLPeerUnverifiedException toString

List of usage examples for javax.net.ssl SSLPeerUnverifiedException toString

Introduction

In this page you can find the example usage for javax.net.ssl SSLPeerUnverifiedException toString.

Prototype

public String toString() 

Source Link

Document

Returns a short description of this throwable.

Usage

From source file:net.vivekiyer.GAL.ConnectionChecker.java

@Override
protected Boolean doInBackground(ActiveSyncManager... params) {
    try {//from w  ww .ja v  a2 s . com
        ActiveSyncManager syncMgr = params[0];
        // Let's try to connect to the server
        statusCode = syncMgr.getExchangeServerVersion();

        requestStatus = syncMgr.getRequestStatus();

        return ((statusCode == 200)
                && ((requestStatus == Parser.STATUS_NOT_SET) || (requestStatus == Parser.STATUS_OK)));

    } catch (javax.net.ssl.SSLPeerUnverifiedException spue) {
        statusCode = SSL_PEER_UNVERIFIED;
        errorString = spue.toString();
        Debug.Log(errorString);
    } catch (UnknownHostException e) {
        statusCode = UNKNOWN_HOST;
        errorString = e.toString();
        Debug.Log(errorString);
    } catch (ConnectTimeoutException e) {
        statusCode = TIMEOUT;
        errorString = e.toString();
        Debug.Log(errorString);
    } catch (SocketTimeoutException e) {
        statusCode = TIMEOUT;
        errorString = e.toString();
        Debug.Log(errorString);
    } catch (Exception e) {
        statusCode = UNDEFINED;
        errorString = e.toString();
        Debug.Log(errorString);
    }
    return false;
}