Class CaptchaGenerationException

All Implemented Interfaces:
Serializable

public class CaptchaGenerationException extends CaptchaException
Captcha Generation Exception - Thrown when CAPTCHA generation fails 验证码生成异常 - 当验证码生成失败时抛出

Features | 主要功能:

  • Carries the CAPTCHA type that failed to generate - 携带生成失败的验证码类型
  • Extends CaptchaException - 继承 CaptchaException

Usage Examples | 使用示例:

throw new CaptchaGenerationException("Failed to render image");
throw new CaptchaGenerationException("Failed", CaptchaType.GIF, cause);

Security | 安全性:

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

    • CaptchaGenerationException

      public CaptchaGenerationException(String message)
      Constructs a new exception with the specified message. 使用指定消息构造新异常。
      Parameters:
      message - the detail message | 详细消息
    • CaptchaGenerationException

      public CaptchaGenerationException(String message, CaptchaType type)
      Constructs a new exception with message and CAPTCHA type. 使用消息和验证码类型构造新异常。
      Parameters:
      message - the detail message | 详细消息
      type - the CAPTCHA type | 验证码类型
    • CaptchaGenerationException

      public CaptchaGenerationException(String message, Throwable cause)
      Constructs a new exception with message and cause. 使用消息和原因构造新异常。
      Parameters:
      message - the detail message | 详细消息
      cause - the cause | 原因
    • CaptchaGenerationException

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

    • getType

      public CaptchaType getType()
      Gets the CAPTCHA type. 获取验证码类型。
      Returns:
      the CAPTCHA type | 验证码类型