Interface ErrorCollector
- All Known Implementing Classes:
ErrorCollectorImpl
public interface ErrorCollector
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddExpectedConstantValue(ExpressionPosition expr, int actual, String s) voidaddGeneralError(ExpressionPosition expr, String s) voidaddNonNumericType(ExpressionPosition expr, TypeProtos.MajorType actual) voidaddUnexpectedArgumentCount(ExpressionPosition expr, int actual, int expected) voidaddUnexpectedArgumentCount(ExpressionPosition expr, int actual, com.google.common.collect.Range<Integer> expected) voidaddUnexpectedArgumentType(ExpressionPosition expr, String name, TypeProtos.MajorType actual, TypeProtos.MajorType[] expected, int argumentIndex) voidaddUnexpectedType(ExpressionPosition expr, int index, TypeProtos.MajorType actual) intbooleanvoidreportErrors(org.slf4j.Logger logger) Checks for errors and throws a user exception if any are found.
-
Method Details
-
addGeneralError
-
addUnexpectedArgumentType
void addUnexpectedArgumentType(ExpressionPosition expr, String name, TypeProtos.MajorType actual, TypeProtos.MajorType[] expected, int argumentIndex) -
addUnexpectedArgumentCount
void addUnexpectedArgumentCount(ExpressionPosition expr, int actual, com.google.common.collect.Range<Integer> expected) -
addUnexpectedArgumentCount
-
addNonNumericType
-
addUnexpectedType
-
addExpectedConstantValue
-
hasErrors
boolean hasErrors() -
getErrorCount
int getErrorCount() -
toErrorString
String toErrorString() -
reportErrors
void reportErrors(org.slf4j.Logger logger) Checks for errors and throws a user exception if any are found. The caller thus need not implement its own error checking; just call this method.- Parameters:
logger-
-