Class CaptchaVerifyException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
cloud.opencode.base.captcha.exception.CaptchaException
cloud.opencode.base.captcha.exception.CaptchaVerifyException
- All Implemented Interfaces:
Serializable
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 Summary
ConstructorsConstructorDescriptionCaptchaVerifyException(String captchaId) Constructs a new exception with the captcha ID.CaptchaVerifyException(String captchaId, String providedAnswer) Constructs a new exception with captcha ID and provided answer.CaptchaVerifyException(String message, String captchaId, Throwable cause) Constructs a new exception with message and captcha ID. -
Method Summary
Modifier and TypeMethodDescriptionGets the CAPTCHA ID.Gets the provided answer.Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
CaptchaVerifyException
Constructs a new exception with the captcha ID. 使用验证码 ID 构造新异常。- Parameters:
captchaId- the CAPTCHA ID | 验证码 ID
-
CaptchaVerifyException
-
CaptchaVerifyException
-
-
Method Details
-
getCaptchaId
-
getProvidedAnswer
Gets the provided answer. 获取提供的答案。- Returns:
- the provided answer | 提供的答案
-