Expand on error message for del variant.
GITHUB_BREAKING_CHANGES=n/a
@@ -47,8 +47,8 @@ public final class TemplateDelegateNode extends TemplateNode {
SoyErrorKind.of("Invalid variant ''{0}'' value must non-negative.");
private static final SoyErrorKind INVALID_VARIANT_EXPR =
SoyErrorKind.of(
- "Invalid variant expression (must be a string literal containing an identifier or global"
- + " expression).");
+ "Invalid variant expression with kind {0} (must be a string literal containing an"
+ + " identifier or global expression).");
public static final String VARIANT_ATTR = "variant";
@@ -244,7 +244,8 @@ public final class TemplateDelegateNode extends TemplateNode {
}
break;
default:
- reporter.report(primitiveNode.getSourceLocation(), INVALID_VARIANT_EXPR);
+ reporter.report(
+ primitiveNode.getSourceLocation(), INVALID_VARIANT_EXPR, primitiveNode.getKind());
}
}
}
