Class ComparisonException

  • All Implemented Interfaces:

    public class ComparisonException
    extends java.lang.ClassCastException
    A ComparisonException is a ClassCastException that encapsulates an XPathException. It is used because the compareTo method is defined to return ClassCastException when values are not comparable; using a ClassCastException 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getMessage()  
      XPathException getReason()  
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ComparisonException

        public ComparisonException​(XPathException reason)
    • Method Detail

      • getMessage

        public java.lang.String getMessage()
        getMessage in class java.lang.Throwable