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:
java.io.Serializable,java.lang.Iterable<ParseException>
public class UnresolvedIdentifiersException extends ParseException implements java.lang.Iterable<ParseException>
This exception is thrown by
DBCheckerwhen several columns or tables do not exist. It lists severalParseException(eitherUnresolvedColumnExceptionorUnresolvedTableException).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(methoditerator()).- Version:
- 1.4 (06/2015)
- Author:
- Grégory Mantelet (CDS;ARI)
- See Also:
DBChecker, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.ArrayList<ParseException>exceptionsList of exceptions (one per unresolved identifier).-
Fields inherited from class adql.parser.ParseException
currentToken, eol, expectedTokenSequences, position, tokenImage
-
-
Constructor Summary
Constructors Constructor Description UnresolvedIdentifiersException()Build an emptyUnresolvedIdentifiersException(that's to say: there is no unresolved identifier).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddException(ParseException pe)Adds aParseException(supposed to be either anUnresolvedColumnExceptionor anUnresolvedTableException).java.util.Iterator<ParseException>getErrors()Gets the list of all errors.java.lang.StringgetMessage()Only tells how many identifiers have not been resolved.intgetNbErrors()Gets the number of unresolved identifiers.java.util.Iterator<ParseException>iterator()-
Methods inherited from class adql.parser.ParseException
getPosition
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Field Detail
-
exceptions
protected java.util.ArrayList<ParseException> exceptions
List of exceptions (one per unresolved identifier).
-
-
Constructor Detail
-
UnresolvedIdentifiersException
public UnresolvedIdentifiersException()
Build an emptyUnresolvedIdentifiersException(that's to say: there is no unresolved identifier).
-
-
Method Detail
-
addException
public final void addException(ParseException pe)
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
public final java.util.Iterator<ParseException> getErrors()
Gets the list of all errors.- Returns:
- Errors list.
-
iterator
public final java.util.Iterator<ParseException> iterator()
- Specified by:
iteratorin interfacejava.lang.Iterable<ParseException>
-
getMessage
public java.lang.String getMessage()
Only tells how many identifiers have not been resolved.- Overrides:
getMessagein classjava.lang.Throwable- See Also:
Throwable.getMessage()
-
-