Skip to content

Commit

Permalink
Add error message for invalid aggregation class
Browse files Browse the repository at this point in the history
  • Loading branch information
dain committed May 27, 2022
1 parent 5a76c23 commit 2b9734d
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ public abstract class SqlAggregationFunction

public static List<SqlAggregationFunction> createFunctionsByAnnotations(Class<?> aggregationDefinition)
{
return ImmutableList.copyOf(AggregationFromAnnotationsParser.parseFunctionDefinitions(aggregationDefinition));
try {
return ImmutableList.copyOf(AggregationFromAnnotationsParser.parseFunctionDefinitions(aggregationDefinition));
}
catch (RuntimeException e) {
throw new IllegalArgumentException("Invalid aggregation class " + aggregationDefinition.getSimpleName());
}
}

public SqlAggregationFunction(FunctionMetadata functionMetadata, AggregationFunctionMetadata aggregationFunctionMetadata)
Expand Down

0 comments on commit 2b9734d

Please sign in to comment.