Package adql.db.exception
Class UnresolvedFunctionException
java.lang.Object
java.lang.Throwable
java.lang.Exception
adql.parser.ParseException
adql.db.exception.UnresolvedFunctionException
- All Implemented Interfaces:
Serializable
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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ADQLFunction
Function which can not be resolved.Fields inherited from class adql.parser.ParseException
currentToken, eol, expectedTokenSequences, position, tokenImage
-
Constructor Summary
ConstructorsConstructorDescriptionBuild the exception with the unresolved function in parameter.UnresolvedFunctionException
(String message) Build the exception with just a message.UnresolvedFunctionException
(String message, ADQLFunction fct) Build the exception with a message but also with the unresolved function in parameter.UnresolvedFunctionException
(String message, TextPosition pos) Build the exception with just a message. -
Method Summary
Modifier and TypeMethodDescriptionstatic String
Get the signature of the function given in parameter.final ADQLFunction
Get the unresolved function at the origin of this exception.Methods inherited from class adql.parser.ParseException
getPosition
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
functionInError
Function which can not be resolved.
-
-
Constructor Details
-
UnresolvedFunctionException
Build the exception with just a message.- Parameters:
message
- Description of the error.
-
UnresolvedFunctionException
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
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
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 Details
-
getFunction
Get the unresolved function at the origin of this exception.- Returns:
- The unresolved function. Note: MAY be NULL
-
getFctSignature
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.
-