hbehr.recaptcha.ReCaptchaObject.TreatReCaptchaError C# (CSharp) Method

TreatReCaptchaError() private static method

private static TreatReCaptchaError ( ReCaptchaJsonResponse answer ) : void
answer ReCaptchaJsonResponse
return void
        private static void TreatReCaptchaError(ReCaptchaJsonResponse answer)
        {
            var error = new ReCaptchaError(answer.ErrorCodes);

            if (error.InvalidInputSecret)
            {
                throw new ReCaptchaException("Invalid ReCaptcha Secret Key !");
            }
            if (error.InvalidInputResponse)
            {
                throw new ReCaptchaException("Invalid Input Response, make sure you are passing correctly the user answer from the Captcha.");
            }
        }
    }