Package org.prolog4j

Class UnknownVariableException

    • Constructor Detail

      • UnknownVariableException

        public UnknownVariableException​(String variable)
        Constructs an UnknownVariableException. It takes the name of the absent variable as its argument. The exception is thrown when you want to get the value of a variable that does not occur in the query being processed.
        Parameters:
        variable - the name of the variable whose value was required but does not exist in the query
      • UnknownVariableException

        public UnknownVariableException​(String variable,
                                        Throwable cause)
        Constructs an UnknownVariableException. It takes the name of the absent variable as its first argument. The exception is thrown when you want to get the value of a variable that does not occur in the query being processed. It takes the original exception (that has been thrown by the inherent Prolog implementation) as another argument.
        Parameters:
        variable - the name of the variable whose value was required but does not exist in the query
        cause - the original exception thrown by the implementation
    • Method Detail

      • getVariable

        public String getVariable()
        Returns the name of the variable that caused the exception.
        Returns:
        the name of the variable that is absent in the query being processed