Package org.apache.nlpcraft.model
Class NCIntentSkip
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.apache.nlpcraft.common.NCException
-
- org.apache.nlpcraft.model.NCIntentSkip
-
- All Implemented Interfaces:
Serializable
public class NCIntentSkip extends org.apache.nlpcraft.common.NCException
Control flow exception to skip current intent. This exception can be thrown by the intent callback to indicate that current intent should be skipped (even though it was matched and its callback was called). If there's more than one intent matched the next best matching intent will be selected and its callback will be called.This exception becomes useful when it is hard or impossible to encode the entire matching logic using just declarative intent DSL. In these cases the intent definition can be relaxed and the "last mile" of intent matching can happen inside of the intent callback's user logic. If it is determined that intent in fact does not match then throwing this exception allows to try next best matching intent, if any.
Read full documentation in Intent Matching section and review examples.
-
-
Constructor Summary
Constructors Constructor Description NCIntentSkip()
Creates new intent skip exception.NCIntentSkip(String msg)
Creates new intent skip exception with given debug message.
-
Method Summary
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
NCIntentSkip
public NCIntentSkip()
Creates new intent skip exception.
-
NCIntentSkip
public NCIntentSkip(String msg)
Creates new intent skip exception with given debug message.- Parameters:
msg
- Skip message for debug output.
-
-