Package javax.xml.xpath
Class XPathException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- javax.xml.xpath.XPathException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
XPathExpressionException,XPathFactoryConfigurationException
public class XPathException extends Exception
XPathExceptionrepresents a generic XPath exception.- Since:
- 1.5
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description XPathException(String message)Constructs a newXPathExceptionwith the specified detailmessage.XPathException(Throwable cause)Constructs a newXPathExceptionwith the specifiedcause.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ThrowablegetCause()Returns the cause of thisThrowable, ornullif there is no cause.voidprintStackTrace()Writes a printable representation of thisThrowable's stack trace to theSystem.errstream.voidprintStackTrace(PrintStream s)Writes a printable representation of thisThrowable's stack trace to the given print stream.voidprintStackTrace(PrintWriter s)Writes a printable representation of thisThrowable's stack trace to the specified print writer.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString
-
-
-
-
Constructor Detail
-
XPathException
public XPathException(String message)
Constructs a new
XPathExceptionwith the specified detailmessage.The
causeis not initialized.If
messageisnull, then aNullPointerExceptionis thrown.- Parameters:
message- The detail message.
-
XPathException
public XPathException(Throwable cause)
Constructs a new
XPathExceptionwith the specifiedcause.If
causeisnull, then aNullPointerExceptionis thrown.- Parameters:
cause- The cause.- Throws:
NullPointerException- ifcauseisnull.
-
-
Method Detail
-
getCause
public Throwable getCause()
Description copied from class:ThrowableReturns the cause of thisThrowable, ornullif there is no cause.
-
printStackTrace
public void printStackTrace(PrintStream s)
Description copied from class:ThrowableWrites a printable representation of thisThrowable's stack trace to the given print stream. If theThrowablecontains acause, the method will be invoked recursively for the nestedThrowable.- Overrides:
printStackTracein classThrowable
-
printStackTrace
public void printStackTrace()
Description copied from class:ThrowableWrites a printable representation of thisThrowable's stack trace to theSystem.errstream.- Overrides:
printStackTracein classThrowable
-
printStackTrace
public void printStackTrace(PrintWriter s)
Description copied from class:ThrowableWrites a printable representation of thisThrowable's stack trace to the specified print writer. If theThrowablecontains acause, the method will be invoked recursively for the nestedThrowable.- Overrides:
printStackTracein classThrowable- Parameters:
s- the writer to write the stack trace on.
-
-