JavaTM Platform
Standard Ed. 6

javax.xml.xpath
类 XPathException

java.lang.Object
  继承者 java.lang.Throwable
      继承者 java.lang.Exception
          继承者 javax.xml.xpath.XPathException
所有已实现的接口:
Serializable
直接已知子类:
XPathExpressionException, XPathFactoryConfigurationException

public class XPathException
     
extends Exception

XPathException 表示通用 XPath 异常。

从以下版本开始:
1.5
另请参见:
序列化表格

构造方法摘要
XPathException(String message)
          构造带指定详细 message 的新 XPathException
XPathException(Throwable cause)
          构造带指定 cause 的新 XPathException
 
方法摘要
 Throwable getCause()
          获取此 XPathException 的 cause。
 void printStackTrace()
          将堆栈跟踪打印到 System.err
 void printStackTrace(PrintStream s)
          将堆栈跟踪打印到指定的 PrintStream
 void printStackTrace(PrintWriter s)
          将堆栈跟踪打印到指定的 PrintWriter
 
从类 java.lang.Throwable 继承的方法
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace, toString
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

构造方法详细信息

XPathException

public XPathException(String message)

构造带指定详细 message 的新 XPathException

cause 未初始化。

如果 messagenull,则抛出 NullPointerException

参数:
message - 详细消息。
抛出:
NullPointerException - 当 messagenull 时。

XPathException

public XPathException(Throwable cause)

构造带指定 cause 的新 XPathException

如果 causenull,则抛出 NullPointerException

参数:
cause - cause
抛出:
NullPointerException - 如果 causenull
方法详细信息

getCause

public Throwable getCause()

获取此 XPathException 的 cause。

覆盖:
Throwable 中的 getCause
返回:
此 XPathException 的 cause。

printStackTrace

public void printStackTrace(PrintStream s)

将堆栈跟踪打印到指定的 PrintStream

覆盖:
Throwable 中的 printStackTrace
参数:
s - 将堆栈跟踪打印到此 PrintStream

printStackTrace

public void printStackTrace()

将堆栈跟踪打印到 System.err

覆盖:
Throwable 中的 printStackTrace

printStackTrace

public void printStackTrace(PrintWriter s)

将堆栈跟踪打印到指定的 PrintWriter

覆盖:
Throwable 中的 printStackTrace
参数:
s - 将堆栈跟踪打印到此 PrintWriter

JavaTM Platform
Standard Ed. 6

提交错误或意见
有关更多的 API 参考资料和开发人员文档,请参阅 Java SE 开发人员文档。该文档包含更详细的、面向开发人员的描述,以及总体概述、术语定义、使用技巧和工作代码示例。

版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策