Class ImageException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
cloud.opencode.base.image.exception.ImageException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ImageFormatException, ImageIOException, ImageOperationException, ImageResourceException, ImageValidationException
Image Exception
图片异常基类
Base exception class for all image processing exceptions.
所有图片处理异常的基类。
Features | 主要功能:
- Base exception for all image processing errors - 所有图片处理错误的基础异常
- Carries ImageErrorCode for programmatic error handling - 携带 ImageErrorCode 用于编程式错误处理
Usage Examples | 使用示例:
// Catch specific exception
try {
OpenImage.read(path);
} catch (ImageException 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 Summary
ConstructorsConstructorDescriptionImageException(String message) Create an image exception with message 创建带消息的图片异常ImageException(String message, ImageErrorCode errorCode) Create an image exception with message and error code 创建带消息和错误码的图片异常ImageException(String message, Throwable cause) Create an image exception with message and cause 创建带消息和原因的图片异常ImageException(String message, Throwable cause, ImageErrorCode errorCode) Create an image exception with message, cause and error code 创建带消息、原因和错误码的图片异常 -
Method Summary
Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ImageException
Create an image exception with message and error code 创建带消息和错误码的图片异常- Parameters:
message- the error message | 错误消息errorCode- the error code | 错误码
-
ImageException
Create an image exception with message, cause and error code 创建带消息、原因和错误码的图片异常- Parameters:
message- the error message | 错误消息cause- the cause | 原因errorCode- the error code | 错误码
-
ImageException
Create an image exception with message 创建带消息的图片异常- Parameters:
message- the error message | 错误消息
-
ImageException
-
-
Method Details
-
getErrorCode
-