Class CaptchaVerifyException

All Implemented Interfaces:
OpenExceptionMeta, Serializable

public class CaptchaVerifyException extends CaptchaException
Captcha Verify Exception - Thrown when CAPTCHA verification fails 验证码验证异常 - 当验证码验证失败时抛出

Features | 主要功能:

  • Carries CAPTCHA ID and provided answer for diagnostics - 携带验证码 ID 和提供的答案用于诊断
  • Extends CaptchaException - 继承 CaptchaException

Usage Examples | 使用示例:

throw new CaptchaVerifyException(captchaId);
throw new CaptchaVerifyException(captchaId, providedAnswer);

Security | 安全性:

  • Thread-safe: Yes (immutable after construction) - 线程安全: 是(构造后不可变)
  • Null-safe: No (captchaId may be null) - 空值安全: 否(captchaId 可能为空)
Since:
JDK 25, opencode-base-captcha V1.0.0
Author:
Leon Soo www.LeonSoo.com
See Also:
  • Constructor Details

    • CaptchaVerifyException

      public CaptchaVerifyException(String captchaId)
      Constructs a new exception with the captcha ID. 使用验证码 ID 构造新异常。
      Parameters:
      captchaId - the CAPTCHA ID | 验证码 ID
    • CaptchaVerifyException

      public CaptchaVerifyException(String captchaId, String providedAnswer)
      Constructs a new exception with captcha ID and provided answer. 使用验证码 ID 和提供的答案构造新异常。
      Parameters:
      captchaId - the CAPTCHA ID | 验证码 ID
      providedAnswer - the provided answer | 提供的答案
    • CaptchaVerifyException

      public CaptchaVerifyException(String message, String captchaId, Throwable cause)
      Constructs a new exception with message and captcha ID. 使用消息和验证码 ID 构造新异常。
      Parameters:
      message - the detail message | 详细消息
      captchaId - the CAPTCHA ID | 验证码 ID
      cause - the cause | 原因
  • Method Details

    • getCaptchaId

      public String getCaptchaId()
      Gets the CAPTCHA ID. 获取验证码 ID。
      Returns:
      the captcha ID | 验证码 ID
    • getProvidedAnswer

      public String getProvidedAnswer()
      Gets the provided answer. 获取提供的答案。
      Returns:
      the provided answer | 提供的答案