package com.braintreepayments.api.exceptions;

/**
 * Exception thrown when the {@link com.google.android.gms.common.api.GoogleApiClient} has an error connecting.
 */
public class GoogleApiClientException extends Exception {

    public enum ErrorType {
        NotAttachedToActivity,
        ConnectionSuspended,
        ConnectionFailed
    }

    private ErrorType mErrorType;
    private int mErrorCode;

    public GoogleApiClientException(ErrorType errorType, int errorCode) {
        mErrorType = errorType;
        mErrorCode = errorCode;
    }

    /**
     * @return The type of error for the error code.
     */
    public ErrorType getErrorType() {
        return mErrorType;
    }

    /**
     * @return The error code returned in {@link com.google.android.gms.common.api.GoogleApiClient.ConnectionCallbacks}
     * or {@link com.google.android.gms.common.ConnectionResult}.
     */
    public int getErrorCode() {
        return mErrorCode;
    }
}

@@ -954,11 +954,206 @@
 e;%0A    %7D
+%0A%0A    @Override%0A    public String getMessage() %7B%0A        return toString();%0A    %7D%0A%0A    @Override%0A    public String toString() %7B%0A        return getErrorType().name() + %22: %22 + getErrorCode();%0A    %7D
 %0A%7D%0A

Add friendly message to GoogleApiClientException