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
AComparisonExceptionis aClassCastExceptionthat encapsulates anXPathException. It is used because thecompareTomethod is defined to returnClassCastExceptionwhen values are not comparable; using aClassCastExceptionthat 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) XPathExceptionreason
-
Constructor Summary
Constructors Constructor Description ComparisonException(XPathException reason)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetMessage()XPathExceptiongetReason()-
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:
getMessagein classThrowable
-
getReason
public XPathException getReason()
-
-