Class YmlParseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
cloud.opencode.base.core.exception.OpenException
cloud.opencode.base.yml.exception.OpenYmlException
cloud.opencode.base.yml.exception.YmlParseException
- All Implemented Interfaces:
OpenExceptionMeta, Serializable
YAML Parse Exception - Thrown when YAML parsing fails
YAML 解析异常 - 当 YAML 解析失败时抛出
This exception is thrown when the YAML content has syntax errors or format issues.
当 YAML 内容存在语法错误或格式问题时抛出此异常。
Features | 主要功能:
- Inherits line/column location from OpenYmlException - 从 OpenYmlException 继承行/列位置
- Wraps underlying parser exceptions - 包装底层解析器异常
- Error code YML_PARSE_001 - 错误码 YML_PARSE_001
Usage Examples | 使用示例:
try {
OpenYml.parse(invalidYaml);
} catch (YmlParseException e) {
System.err.println("Parse error: " + e.getMessage());
}
Security | 安全性:
- Thread-safe: Yes (immutable after construction) - 线程安全: 是(构建后不可变)
- Null-safe: No (message may be null) - 空值安全: 否(消息可能为空)
- Since:
- JDK 25, opencode-base-yml V1.0.3
- Author:
- Leon Soo www.LeonSoo.com
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionYmlParseException(String message) Constructs a parse exception with message.YmlParseException(String message, int line, int column) Constructs a parse exception with message and location.YmlParseException(String message, Throwable cause) Constructs a parse exception with message and cause.YmlParseException(String message, Throwable cause, int line, int column) Constructs a parse exception with message, cause and location. -
Method Summary
Methods inherited from class OpenYmlException
getColumn, getLine, hasLocationMethods 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
-
YmlParseException
Constructs a parse exception with message. 构造带消息的解析异常。- Parameters:
message- the detail message | 详细消息
-
YmlParseException
Constructs a parse exception with message and location. 构造带消息和位置的解析异常。- Parameters:
message- the detail message | 详细消息line- the line number | 行号column- the column number | 列号
-
YmlParseException
-
YmlParseException
-