Class CutException

  • All Implemented Interfaces:
    java.io.Serializable

    public final class CutException
    extends java.lang.RuntimeException
    Exception thrown when the evaluation of a rule backtracks to a cut.
    See Also:
    Cut, InterpretedUserDefinedPredicate, Serialized Form
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private CutException()
      Private constructor to force use of CUT_EXCEPTION
    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, 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
    • Field Detail

      • CUT_EXCEPTION

        public static final CutException CUT_EXCEPTION
        Singleton instance.

        Reuse a single instance to avoid the stack trace generation overhead of creating a new exception each time. The CutException is specifically used for control flow in InterpretedUserDefinedPredicate.evaluate() and its stack trace is not required.

    • Constructor Detail

      • CutException

        private CutException()
        Private constructor to force use of CUT_EXCEPTION