Package org.apache.sling.api.resource
Class QuerySyntaxException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.sling.api.SlingException
org.apache.sling.api.resource.QuerySyntaxException
- All Implemented Interfaces:
Serializable
The
QuerySyntaxException is thrown by the
ResourceResolver.findResources(String, String) and
ResourceResolver.queryResources(String, String) methods if the query
syntax is wrong or the requested query language is not available.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionQuerySyntaxException(String message, String query, String language) Creates an exception describing an invalid query or unsupported language.QuerySyntaxException(String message, String query, String language, Throwable cause) Creates an exception describing an invalid query or unsupported language and its cause. -
Method Summary
Modifier and TypeMethodDescriptionReturns the requested query language.getQuery()Returns the query that could not be executed.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
QuerySyntaxException
Creates an exception describing an invalid query or unsupported language.- Parameters:
message- The detail messagequery- The querylanguage- The query language
-
QuerySyntaxException
Creates an exception describing an invalid query or unsupported language and its cause.- Parameters:
message- The detail messagequery- The querylanguage- The query languagecause- The underlying cause
-
-
Method Details
-
getQuery
Returns the query that could not be executed.- Returns:
- The query supplied to the constructor
-
getLanguage
Returns the requested query language.- Returns:
- The language supplied to the constructor
-