*/
int argCount = node.jjtGetNumChildren();
if (argCount == 0)
{
throw new TemplateInitException(
"#" + getName() + "() requires exactly one argument",
context.getCurrentTemplateName(),
node.getColumn(),
node.getLine());
}
if (argCount > 1)
{
/*
* use line/col of second argument
*/
throw new TemplateInitException(
"#" + getName() + "() requires exactly one argument",
context.getCurrentTemplateName(),
node.jjtGetChild(1).getColumn(),
node.jjtGetChild(1).getLine());
}
Node childNode = node.jjtGetChild(0);
if ( childNode.getType() != ParserTreeConstants.JJTSTRINGLITERAL &&
childNode.getType() != ParserTreeConstants.JJTREFERENCE )
{
throw new TemplateInitException(
"#" + getName() + "() argument must be a string literal or reference",
context.getCurrentTemplateName(),
childNode.getColumn(),
childNode.getLine());
}