Class UnresolvedFunctionException

  • All Implemented Interfaces:
    java.io.Serializable

    public class UnresolvedFunctionException
    extends ParseException
    Exception thrown when a function can not be resolved by the library.
    Since:
    1.3
    Version:
    1.4 (08/2015)
    Author:
    Grégory Mantelet (ARI)
    See Also:
    Serialized Form
    • Field Detail

      • functionInError

        protected final ADQLFunction functionInError
        Function which can not be resolved.
    • Constructor Detail

      • UnresolvedFunctionException

        public UnresolvedFunctionException​(java.lang.String message)
        Build the exception with just a message.
        Parameters:
        message - Description of the error.
      • UnresolvedFunctionException

        public UnresolvedFunctionException​(java.lang.String message,
                                           TextPosition pos)
        Build the exception with just a message.
        Parameters:
        message - Description of the error.
        pos - Position of the unresolved function inside the ADQL query.
        Since:
        1.4
      • UnresolvedFunctionException

        public UnresolvedFunctionException​(ADQLFunction fct)
        Build the exception with the unresolved function in parameter. The position of this function in the ADQL query can be retrieved and used afterwards.
        Parameters:
        fct - The unresolved function.
      • UnresolvedFunctionException

        public UnresolvedFunctionException​(java.lang.String message,
                                           ADQLFunction fct)
        Build the exception with a message but also with the unresolved function in parameter. The position of this function in the ADQL query can be retrieved and used afterwards.
        Parameters:
        message - Description of the error.
        fct - The unresolved function.
    • Method Detail

      • getFunction

        public final ADQLFunction getFunction()
        Get the unresolved function at the origin of this exception.
        Returns:
        The unresolved function. Note: MAY be NULL
      • getFctSignature

        public static java.lang.String getFctSignature​(ADQLFunction fct)

        Get the signature of the function given in parameter.

        In this signature, just the name and the type of all the parameters are written. The return type is never part of a function signature.

        Note 1: A parameter type can be either "NUMERIC", "STRING" or "GEOMETRY". In order to be the most generic has possible, no more precision about a type is returned here. If the parameter is none of these type kinds, "param" suffixed by the parameter index (e.g. "param1") is returned.

        Note 2: If the given object is NULL, an empty string is returned.

        Parameters:
        fct - Function whose the signature must be returned.
        Returns:
        The corresponding signature.