Package org.prolog4j
Class InvalidQueryException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.prolog4j.InvalidQueryException
-
- All Implemented Interfaces:
Serializable
public class InvalidQueryException extends RuntimeException
This exception is thrown when a syntactically incorrect Prolog query is processed.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description InvalidQueryException(String query)
Constructs an InvalidQueryException.InvalidQueryException(String query, Throwable cause)
Constructs an InvalidQueryException exception.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getQuery()
Returns the query that caused the exception.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
InvalidQueryException
public InvalidQueryException(String query)
Constructs an InvalidQueryException. It takes as its argument the Prolog query that cannot be processed.- Parameters:
query
- the syntactically incorrect Prolog query
-
InvalidQueryException
public InvalidQueryException(String query, Throwable cause)
Constructs an InvalidQueryException exception. It takes as its first argument the Prolog query that cannot be processed. Its second argument is the original exception (that has been thrown by the inherent Prolog implementation).- Parameters:
query
- the syntactically incorrect Prolog querycause
- the original exception thrown by the implementation
-
-
Method Detail
-
getQuery
public String getQuery()
Returns the query that caused the exception.- Returns:
- the syntactically incorrect Prolog query
-
-