Class XmlXPathException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
cloud.opencode.base.core.exception.OpenException
cloud.opencode.base.xml.exception.OpenXmlException
cloud.opencode.base.xml.exception.XmlXPathException
- All Implemented Interfaces:
OpenExceptionMeta, Serializable
XPath Exception - Thrown when XPath evaluation fails
XPath 异常 - 当 XPath 求值失败时抛出
This exception is thrown when an XPath expression is invalid or cannot be evaluated against the given XML document.
当 XPath 表达式无效或无法针对给定的 XML 文档求值时抛出此异常。
Features | 主要功能:
- Exception for XPath evaluation failures - XPath 求值失败的异常
- Extends OpenXmlException with specific context - 继承 OpenXmlException,带特定上下文
Usage Examples | 使用示例:
// Catch specific exception
try {
// XML operation
} catch (XmlXPathException 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.3
- Author:
- Leon Soo www.LeonSoo.com
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionXmlXPathException(String xpath, String message) Constructs an XPath exception with expression and message.XmlXPathException(String xpath, Throwable cause) Constructs an XPath exception with expression and cause. -
Method Summary
Methods inherited from class OpenXmlException
bindError, getColumn, getLine, hasLocation, parseError, transformError, validationError, xpathErrorMethods 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
-
XmlXPathException
-
XmlXPathException
-
-
Method Details
-
getXPath
Returns the XPath expression that caused the error. 返回导致错误的 XPath 表达式。- Returns:
- the XPath expression | XPath 表达式
-