Package net.sf.saxon.trans
Class UncheckedXPathException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- net.sf.saxon.trans.UncheckedXPathException
-
- All Implemented Interfaces:
java.io.Serializable
public class UncheckedXPathException extends java.lang.RuntimeException
When implementing certain interfaces Saxon is not able to throw a checked exception because the interface definition does not allow it. In these circumstances the checked exception is wrapped in an unchecked exception, which is thrown in its place. The intent is that the unchecked exception will be caught and "unwrapped" before the calling application gets to see it.User-written callback functions (such as
ErrorReporter
may also throw anUncheckedXPathException
; this will generally cause the query or transformation to be aborted.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UncheckedXPathException(java.lang.String message)
Create an unchecked XPath exception with supplied error messageUncheckedXPathException(java.lang.String message, java.lang.String errorCode)
Create an unchecked XPath exception with supplied error message and error codeUncheckedXPathException(java.lang.Throwable cause)
UncheckedXPathException(XPathException cause)
Create an unchecked XPath exception that wraps a supplied checked exception
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getMessage()
XPathException
getXPathException()
Get the underlying (checked) XPathException
-
-
-
Constructor Detail
-
UncheckedXPathException
public UncheckedXPathException(XPathException cause)
Create an unchecked XPath exception that wraps a supplied checked exception- Parameters:
cause
- the checked exception to be wrapped
-
UncheckedXPathException
public UncheckedXPathException(java.lang.String message)
Create an unchecked XPath exception with supplied error message- Parameters:
message
- the error message
-
UncheckedXPathException
public UncheckedXPathException(java.lang.String message, java.lang.String errorCode)
Create an unchecked XPath exception with supplied error message and error code- Parameters:
message
- the error messageerrorCode
- the local part of the error code
-
UncheckedXPathException
public UncheckedXPathException(java.lang.Throwable cause)
-
-
Method Detail
-
getXPathException
public XPathException getXPathException()
Get the underlying (checked) XPathException- Returns:
- the checked XPathException wrapped by this UncheckedXPathException
-
getMessage
public java.lang.String getMessage()
- Overrides:
getMessage
in classjava.lang.Throwable
-
-