public class ErrorCollectorImpl extends Object implements ErrorCollector
Constructor and Description |
---|
ErrorCollectorImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addExpectedConstantValue(ExpressionPosition expr,
int actual,
String s) |
void |
addGeneralError(ExpressionPosition expr,
String s) |
void |
addNonNumericType(ExpressionPosition expr,
TypeProtos.MajorType actual) |
void |
addUnexpectedArgumentCount(ExpressionPosition expr,
int actual,
int expected) |
void |
addUnexpectedArgumentCount(ExpressionPosition expr,
int actual,
org.apache.drill.shaded.guava.com.google.common.collect.Range<Integer> expected) |
void |
addUnexpectedArgumentType(ExpressionPosition expr,
String name,
TypeProtos.MajorType actual,
TypeProtos.MajorType[] expected,
int argumentIndex) |
void |
addUnexpectedType(ExpressionPosition expr,
int index,
TypeProtos.MajorType actual) |
int |
getErrorCount() |
boolean |
hasErrors() |
void |
reportErrors(org.slf4j.Logger logger)
Checks for errors and throws a user exception if any are found.
|
String |
toErrorString() |
String |
toString() |
public void addGeneralError(ExpressionPosition expr, String s)
addGeneralError
in interface ErrorCollector
public void addUnexpectedArgumentType(ExpressionPosition expr, String name, TypeProtos.MajorType actual, TypeProtos.MajorType[] expected, int argumentIndex)
addUnexpectedArgumentType
in interface ErrorCollector
public void addUnexpectedArgumentCount(ExpressionPosition expr, int actual, org.apache.drill.shaded.guava.com.google.common.collect.Range<Integer> expected)
addUnexpectedArgumentCount
in interface ErrorCollector
public void addUnexpectedArgumentCount(ExpressionPosition expr, int actual, int expected)
addUnexpectedArgumentCount
in interface ErrorCollector
public void addNonNumericType(ExpressionPosition expr, TypeProtos.MajorType actual)
addNonNumericType
in interface ErrorCollector
public void addUnexpectedType(ExpressionPosition expr, int index, TypeProtos.MajorType actual)
addUnexpectedType
in interface ErrorCollector
public void addExpectedConstantValue(ExpressionPosition expr, int actual, String s)
addExpectedConstantValue
in interface ErrorCollector
public boolean hasErrors()
hasErrors
in interface ErrorCollector
public int getErrorCount()
getErrorCount
in interface ErrorCollector
public String toErrorString()
toErrorString
in interface ErrorCollector
public void reportErrors(org.slf4j.Logger logger)
ErrorCollector
reportErrors
in interface ErrorCollector
Copyright © 1970 The Apache Software Foundation. All rights reserved.