Package net.sf.saxon.expr.sort
Class ComparisonException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- java.lang.ClassCastException
-
- net.sf.saxon.expr.sort.ComparisonException
-
- All Implemented Interfaces:
Serializable
public class ComparisonException extends ClassCastException
AComparisonException
is aClassCastException
that encapsulates anXPathException
. It is used because thecompareTo
method is defined to returnClassCastException
when values are not comparable; using aClassCastException
that encapsulates XPath error information enables us to return the correct error code, and to distinguish dynamic errors from type errors.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description (package private) XPathException
reason
-
Constructor Summary
Constructors Constructor Description ComparisonException(XPathException reason)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getMessage()
XPathException
getReason()
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Field Detail
-
reason
XPathException reason
-
-
Constructor Detail
-
ComparisonException
public ComparisonException(XPathException reason)
-
-
Method Detail
-
getMessage
public String getMessage()
- Overrides:
getMessage
in classThrowable
-
getReason
public XPathException getReason()
-
-