Class OpenImageCodecException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
cloud.opencode.base.core.exception.OpenException
cloud.opencode.base.image.codec.exception.OpenImageCodecException
- All Implemented Interfaces:
OpenExceptionMeta, Serializable
Image Codec Exception - Base exception for all image codec operations.
图像编解码异常 - 所有图像编解码操作的基础异常。
This exception is thrown when image codec operations fail, including
decoding, encoding and format validation errors. Extends
OpenException to integrate with the OpenCode unified exception
hierarchy.
当图像编解码操作失败时抛出此异常,包括解码、编码和格式校验错误。
继承 OpenException 以集成 OpenCode 统一异常体系。
Semantic split with sister class | 与姊妹类的语义分工: The image stack splits exceptions by failure phase:
- codec runtime failures (decode bomb, malformed
bytes, native-encoder error, magic-byte mismatch) →
OpenImageCodecException(this class, extendsOpenException) - argument validation on
Raster/PixelFormatAPIs (non-positive dimensions over the cap, buffer length mismatch with declared dimensions) →cloud.opencode.base.image.core.exception.OpenImageCoreException(extendsIllegalArgumentExceptionso JDK idiom catch keeps working)
图像栈按失败阶段拆分异常:codec 层运行时失败(解码炸弹、字节畸形、
原生编码器错误、magic byte 不匹配)抛 OpenImageCodecException;
core 层参数校验失败(Raster/PixelFormat 的维度非正、
超过上限、缓冲长度与声明维度不符)抛 OpenImageCoreException
(继承 IllegalArgumentException 以保留 JDK 习惯捕获)。
Security | 安全性:
- Thread-safe: Yes - immutable after construction. - 线程安全: 是 - 构造后不可变。
- Null-safe: message is required, cause may be null. - 空值安全: 消息必填,原因可为空。
- Since:
- JDK 25, opencode-base-image-codec V1.0.4
- Author:
- Leon Soo www.LeonSoo.com
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionOpenImageCodecException(String message) Creates exception with message.OpenImageCodecException(String message, Throwable cause) Creates exception with message and cause. -
Method Summary
Methods inherited from class OpenException
getComponent, getErrorCode, getMessage, getRawMessageMethods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface OpenExceptionMeta
getMetaPrefix
-
Constructor Details
-
OpenImageCodecException
Creates exception with message. 创建带消息的异常。- Parameters:
message- error message | 错误消息
-
OpenImageCodecException
-