geirm 00/11/19 15:50:34
Modified: src/java/org/apache/velocity/runtime/directive
VelocimacroProxy.java
Log:
Catch the problem when the AST is null due to configuration error.
Revision Changes Path
1.2 +5 -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.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- VelocimacroProxy.java 2000/11/19 23:28:00 1.1
+++ VelocimacroProxy.java 2000/11/19 23:50:34 1.2
@@ -58,7 +58,7 @@
* a proxy Directive-derived object to fit with the current directive system
*
* @author <a href="mailto:[EMAIL PROTECTED]">Geir Magnusson Jr.</a>
- * @version $Id: VelocimacroProxy.java,v 1.1 2000/11/19 23:28:00 geirm Exp $
+ * @version $Id: VelocimacroProxy.java,v 1.2 2000/11/19 23:50:34 geirm Exp $
*/
package org.apache.velocity.runtime.directive;
@@ -142,7 +142,10 @@
{
try
{
- nodeTree_.render(context, writer );
+ if (nodeTree_ != null)
+ nodeTree_.render(context, writer );
+ else
+ Runtime.error( "VM error : " + strMacroName_ + ". Null AST");
}
catch ( Exception e )
{