Class XmlParseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
cloud.opencode.base.xml.exception.OpenXmlException
cloud.opencode.base.xml.exception.XmlParseException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
SaxParseException
XML Parse Exception - Thrown when XML parsing fails
XML 解析异常 - 当 XML 解析失败时抛出
This exception is thrown when the XML parser encounters malformed XML, encoding issues, or other parsing errors.
当 XML 解析器遇到格式错误的 XML、编码问题或其他解析错误时抛出此异常。
Features | 主要功能:
- Exception for XML parsing failures with line/column info - 带行/列信息的 XML 解析失败异常
- Extends OpenXmlException with specific context - 继承 OpenXmlException,带特定上下文
Usage Examples | 使用示例:
// Catch specific exception
try {
// XML operation
} catch (XmlParseException 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-xml V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionXmlParseException(String message) Constructs a parse exception with message only.XmlParseException(String message, int line, int column) Constructs a parse exception with message and location.XmlParseException(String message, int line, int column, Throwable cause) Constructs a parse exception with message, location and cause.XmlParseException(String message, Throwable cause) Constructs a parse exception with message and cause. -
Method Summary
Methods inherited from class OpenXmlException
bindError, getColumn, getLine, hasLocation, parseError, transformError, validationError, xpathErrorMethods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
XmlParseException
Constructs a parse exception with message and location. 构造带消息和位置的解析异常。- Parameters:
message- the detail message | 详细消息line- the line number | 行号column- the column number | 列号
-
XmlParseException
-
XmlParseException
Constructs a parse exception with message only. 构造仅带消息的解析异常。- Parameters:
message- the detail message | 详细消息
-
XmlParseException
-