RecaptchaException

public final class RecaptchaException extends Exception


Exception to be returned on reCAPTCHA Enterprise API failures.

Summary

Public constructors

RecaptchaException(
    @NonNull RecaptchaErrorCode errorCode,
    @NonNull String errorMessage
)

Public methods

final @NonNull RecaptchaErrorCode

Returns the RecaptchaErrorCode associated with this exception.

final @NonNull String

Returns a useful message to help diagnose this exception.

Public constructors

RecaptchaException

public RecaptchaException(
    @NonNull RecaptchaErrorCode errorCode,
    @NonNull String errorMessage
)

Public methods

getErrorCode

public final @NonNull RecaptchaErrorCode getErrorCode()

Returns the RecaptchaErrorCode associated with this exception.

getErrorMessage

public final @NonNull String getErrorMessage()

Returns a useful message to help diagnose this exception.