Package adql.db.exception
Class UnresolvedIdentifiersException
java.lang.Object
java.lang.Throwable
java.lang.Exception
adql.parser.grammar.ParseException
adql.db.exception.UnresolvedIdentifiersException
- All Implemented Interfaces:
Serializable,Iterable<ParseException>
public class UnresolvedIdentifiersException
extends ParseException
implements Iterable<ParseException>
This exception is thrown by
DBChecker when several columns, tables,
functions or even ADQL features do not exist. It lists several
ParseException (either UnresolvedColumnException,
UnresolvedTableException, UnresolvedFunctionException,
UnresolvedJoinException or UnsupportedFeatureException).
Its message only tells the number of unresolved identifiers.
If you want to have more details about the position and the exact message of each exception, you just have to iterate
on this UnresolvedIdentifiersException (method iterator()).
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ArrayList<ParseException> List of exceptions (one per unresolved identifier).protected final StringType of the unresolved/unsupported items listed in this exception.Fields inherited from class adql.parser.grammar.ParseException
currentToken, EOL, expectedTokenSequences, position, tokenImage -
Constructor Summary
ConstructorsConstructorDescriptionBuild an emptyUnresolvedIdentifiersException(that's to say: there is no unresolved identifier).UnresolvedIdentifiersException(String itemNature) Build an emptyUnresolvedIdentifiersException(that's to say: there is no unresolved identifier). -
Method Summary
Modifier and TypeMethodDescriptionfinal voidAdds aParseException(supposed to be either anUnresolvedColumnExceptionor anUnresolvedTableException).final Iterator<ParseException> Gets the list of all errors.Only tells how many identifiers have not been resolved.final intGets the number of unresolved identifiers.final Iterator<ParseException> iterator()Methods inherited from class adql.parser.grammar.ParseException
getPositionMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
itemNature
Type of the unresolved/unsupported items listed in this exception.Examples:
unresolved identifier(default),unsupported expression
- Since:
- 2.0
-
exceptions
List of exceptions (one per unresolved identifier).
-
-
Constructor Details
-
UnresolvedIdentifiersException
public UnresolvedIdentifiersException()Build an emptyUnresolvedIdentifiersException(that's to say: there is no unresolved identifier). -
UnresolvedIdentifiersException
Build an emptyUnresolvedIdentifiersException(that's to say: there is no unresolved identifier).- Parameters:
itemNature- Type of the unresolved items listed in this exception. By default:unresolved identifier.- Since:
- 2.0
-
-
Method Details
-
addException
Adds aParseException(supposed to be either anUnresolvedColumnExceptionor anUnresolvedTableException).- Parameters:
pe- An exception.
-
getNbErrors
public final int getNbErrors()Gets the number of unresolved identifiers.- Returns:
- The number of unresolved identifiers.
-
getErrors
Gets the list of all errors.- Returns:
- Errors list.
-
iterator
- Specified by:
iteratorin interfaceIterable<ParseException>
-
getMessage
Only tells how many identifiers have not been resolved.- Overrides:
getMessagein classThrowable- See Also:
-