velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From by...@apache.org
Subject svn commit: r740594 - /velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java
Date Wed, 04 Feb 2009 03:43:10 GMT
Author: byron
Date: Wed Feb  4 03:43:09 2009
New Revision: 740594

URL: http://svn.apache.org/viewvc?rev=740594&view=rev
Log:
Fixed number of arguments reported in macro mis-match argument exception

Modified:
    velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java

Modified: velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java?rev=740594&r1=740593&r2=740594&view=diff
==============================================================================
--- velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java
(original)
+++ velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java
Wed Feb  4 03:43:09 2009
@@ -261,7 +261,7 @@
      */
     private String buildErrorMsg(Node node)
     {
-      int i = node.jjtGetNumChildren();  // the number of arguments this call provided
+      int i = node.jjtGetNumChildren() - 1; // the number of arguments this call provided
       String msg = "VM #" + macroName + ": too "
         + ((getNumArgs() > i) ? "few" : "many") + " arguments to macro. Wanted "
         + getNumArgs() + " got " + i;      



Mime
View raw message