You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by ge...@locus.apache.org on 2000/12/05 06:07:40 UTC
cvs commit: jakarta-velocity/src/java/org/apache/velocity/runtime/directive Macro.java VelocimacroProxy.java
geirm 00/12/04 21:07:40
Modified: src/java/org/apache/velocity/runtime/directive Macro.java
VelocimacroProxy.java
Log:
Added support for template name in log entry in case of parse error.
Revision Changes Path
1.4 +3 -2 jakarta-velocity/src/java/org/apache/velocity/runtime/directive/Macro.java
Index: Macro.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/directive/Macro.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Macro.java 2000/11/28 04:16:22 1.3
+++ Macro.java 2000/12/05 05:07:39 1.4
@@ -70,7 +70,7 @@
* macro. It is used inline in the parser when processing a directive.
*
* @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
- * @version $Id: Macro.java,v 1.3 2000/11/28 04:16:22 jvanzyl Exp $
+ * @version $Id: Macro.java,v 1.4 2000/12/05 05:07:39 geirm Exp $
*/
package org.apache.velocity.runtime.directive;
@@ -303,7 +303,8 @@
*/
int iCount = 0;
- while( t != tLast )
+
+ while( t != null && t != tLast )
{
iCount++;
t = t.next;
1.12 +2 -2 jakarta-velocity/src/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java
Index: VelocimacroProxy.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- VelocimacroProxy.java 2000/12/04 02:08:48 1.11
+++ VelocimacroProxy.java 2000/12/05 05:07:39 1.12
@@ -58,7 +58,7 @@
* a proxy Directive-derived object to fit with the current directive system
*
* @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
- * @version $Id: VelocimacroProxy.java,v 1.11 2000/12/04 02:08:48 geirm Exp $
+ * @version $Id: VelocimacroProxy.java,v 1.12 2000/12/05 05:07:39 geirm Exp $
*/
package org.apache.velocity.runtime.directive;
@@ -274,7 +274,7 @@
//System.out.println("Expanded : " + strExpanded.toString() );
ByteArrayInputStream inStream = new ByteArrayInputStream( strExpanded.toString().getBytes() );
- nodeTree_ = Runtime.parse( inStream );
+ nodeTree_ = Runtime.parse( inStream, "VM:"+strMacroName_ );
}
catch ( Exception e )
{