org.gcube.opensearch.opensearchlibrary.query
Class MalformedQueryException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.gcube.opensearch.opensearchlibrary.query.MalformedQueryException
All Implemented Interfaces:
java.io.Serializable

public class MalformedQueryException
extends java.lang.Exception

An exception that is thrown when an error in a query construct is detected, e.g. an invalid parameter value

Author:
gerasimos.farantatos
See Also:
Serialized Form

Constructor Summary
MalformedQueryException()
          Creates a new instance
MalformedQueryException(java.lang.String message)
          Creates a new instance
MalformedQueryException(java.lang.String message, java.lang.String name)
          Creates a new instance
MalformedQueryException(java.lang.String message, java.lang.Throwable cause)
          Creates a new instance
MalformedQueryException(java.lang.Throwable cause)
          Creates a new instance
 
Method Summary
 java.lang.String getName()
          Retrieves the name of the parameter related to the error
 java.lang.String toString()
          Returns a short description of this exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MalformedQueryException

public MalformedQueryException()
Creates a new instance


MalformedQueryException

public MalformedQueryException(java.lang.String message)
Creates a new instance

Parameters:
message - The error message

MalformedQueryException

public MalformedQueryException(java.lang.String message,
                               java.lang.String name)
Creates a new instance

Parameters:
message - The error message
name - The name of the query parameter related to the error

MalformedQueryException

public MalformedQueryException(java.lang.Throwable cause)
Creates a new instance

Parameters:
cause - The cause of the error

MalformedQueryException

public MalformedQueryException(java.lang.String message,
                               java.lang.Throwable cause)
Creates a new instance

Parameters:
message - The error message
cause - The cause of the error
Method Detail

getName

public java.lang.String getName()
Retrieves the name of the parameter related to the error

Returns:
The name of the parameter

toString

public java.lang.String toString()
Returns a short description of this exception. The description is similar to that of an Exception also including the query parameter name related to the error, if it is specified.

Overrides:
toString in class java.lang.Throwable
Returns:
A string representation of the exception