Class QuerySyntaxException

All Implemented Interfaces:
Serializable

public class QuerySyntaxException extends SlingException
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 Details

    • QuerySyntaxException

      public QuerySyntaxException(String message, String query, String language)
      Creates an exception describing an invalid query or unsupported language.
      Parameters:
      message - The detail message
      query - The query
      language - The query language
    • QuerySyntaxException

      public QuerySyntaxException(String message, String query, String language, Throwable cause)
      Creates an exception describing an invalid query or unsupported language and its cause.
      Parameters:
      message - The detail message
      query - The query
      language - The query language
      cause - The underlying cause
  • Method Details

    • getQuery

      public String getQuery()
      Returns the query that could not be executed.
      Returns:
      The query supplied to the constructor
    • getLanguage

      public String getLanguage()
      Returns the requested query language.
      Returns:
      The language supplied to the constructor