- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- javax.xml.xpath.XPathException
-
- All Implemented Interfaces:
-
Serializable
public class XPathException extends 异常
XPathException表示一个通用的XPath异常。- 从以下版本开始:
- 1.5
- 另请参见:
- Serialized Form
-
-
构造方法摘要
构造方法 Constructor 描述 XPathException(String message)构造新的XPathException具有指定的细节message。XPathException(Throwable cause)构造一个新的XPathException与指定的cause。
-
方法摘要
所有方法 接口方法 具体的方法 Modifier and Type 方法 描述 ThrowablegetCause()得到这个XPathException的原因。voidprintStackTrace()打印堆栈跟踪到System.err。voidprintStackTrace(PrintStream s)打印堆栈跟踪指定为PrintStream。voidprintStackTrace(PrintWriter s)打印堆栈跟踪指定PrintWriter。-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString
-
-
-
-
构造方法详细信息
-
XPathException
public XPathException(String message)
构造一个新的XPathException,具体细节message。cause未初始化。如果
message为null,则抛出NullPointerException。- 参数
-
message- 详细信息。 - 异常
-
NullPointerException- 当message是null。
-
XPathException
public XPathException(Throwable cause)
构造一个新的XPathException与指定的cause。如果
cause是null,那么抛出一个NullPointerException。- 参数
-
cause- 原因。 - 异常
-
NullPointerException- 如果cause是null。
-
-
方法详细信息
-
getCause
public Throwable getCause()
得到这个XPathException的原因。
-
printStackTrace
public void printStackTrace(PrintStream s)
打印堆栈跟踪指定PrintStream。- 重写:
-
printStackTrace在Throwable - 参数
-
s- 打印堆栈跟踪到这个PrintStream。
-
printStackTrace
public void printStackTrace()
打印堆栈跟踪到System.err。- 重写:
-
printStackTrace在Throwable
-
printStackTrace
public void printStackTrace(PrintWriter s)
打印堆栈跟踪指定为PrintWriter。- 重写:
-
printStackTrace在Throwable - 参数
-
s- 打印堆栈跟踪到这个PrintWriter。
-
-