diff --git a/src/main/java/build/buf/protovalidate/internal/expression/AstExpression.java b/src/main/java/build/buf/protovalidate/internal/expression/AstExpression.java index 1159d3c4..c1b955ac 100644 --- a/src/main/java/build/buf/protovalidate/internal/expression/AstExpression.java +++ b/src/main/java/build/buf/protovalidate/internal/expression/AstExpression.java @@ -45,7 +45,8 @@ public static AstExpression newAstExpression(Env env, Expression expr) throws CompilationException { Env.AstIssuesTuple astIssuesTuple = env.compile(expr.expression); if (astIssuesTuple.hasIssues()) { - throw new CompilationException("Failed to compile expression " + expr.id); + throw new CompilationException( + "Failed to compile expression " + expr.id + ":\n" + astIssuesTuple.getIssues()); } Ast ast = astIssuesTuple.getAst(); Type outType = ast.getResultType();