Package adql.db.exception
Class UnresolvedIdentifiersException
java.lang.Object
java.lang.Throwable
java.lang.Exception
adql.parser.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 or tables do not exist.
It lists several ParseException (either UnresolvedColumnException or UnresolvedTableException).
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()).
- Version:
- 1.4 (06/2015)
- Author:
- Grégory Mantelet (CDS;ARI)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ArrayList<ParseException>List of exceptions (one per unresolved identifier).Fields inherited from class adql.parser.ParseException
currentToken, eol, expectedTokenSequences, position, tokenImage -
Constructor Summary
ConstructorsConstructorDescriptionBuild 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.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
-
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).
-
-
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:
-