Class ImageTimeoutException

All Implemented Interfaces:
Serializable

public class ImageTimeoutException extends ImageResourceException
Image Timeout Exception 图片处理超时异常

Exception thrown when image processing times out.

当图片处理超时时抛出的异常。

Features | 主要功能:

  • Exception for image processing timeouts - 图片处理超时的异常
  • Carries ImageErrorCode for programmatic error handling - 携带 ImageErrorCode 用于编程式错误处理

Usage Examples | 使用示例:

// Catch specific exception
try {
    OpenImage.read(path);
} catch (ImageTimeoutException e) {
    System.err.println(e.getMessage());
}

Security | 安全性:

  • Thread-safe: Yes (immutable exception) - 线程安全: 是(不可变异常)
  • Null-safe: No (message must not be null) - 空值安全: 否(消息不能为 null)
Since:
JDK 25, opencode-base-image V1.0.0
Author:
Leon Soo www.LeonSoo.com
See Also:
  • Constructor Details

    • ImageTimeoutException

      public ImageTimeoutException(String message)
      Create an image timeout exception 创建图片超时异常
      Parameters:
      message - the error message | 错误消息
    • ImageTimeoutException

      public ImageTimeoutException(String message, Duration timeout)
      Create an image timeout exception with timeout 创建带超时时间的图片超时异常
      Parameters:
      message - the error message | 错误消息
      timeout - the timeout duration | 超时时间
    • ImageTimeoutException

      public ImageTimeoutException(String message, Throwable cause)
      Create an image timeout exception with cause 创建带原因的图片超时异常
      Parameters:
      message - the error message | 错误消息
      cause - the cause | 原因
  • Method Details

    • getTimeout

      public Duration getTimeout()
      Get the timeout duration 获取超时时间
      Returns:
      the timeout duration or null | 超时时间或null