Update of /cvsroot/webmacro/webmacro/src/org/webmacro/directive
In directory usw-pr-cvs1:/tmp/cvs-serv13427/src/org/webmacro/directive
Modified Files:
IncludeDirective.java
Log Message:
On second thought, just output a warning. There are lots of cases where a template should be able to #include itself.
Index: IncludeDirective.java
===================================================================
RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/directive/IncludeDirective.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** IncludeDirective.java 5 Nov 2002 20:58:01 -0000 1.13
--- IncludeDirective.java 5 Nov 2002 22:01:28 -0000 1.14
***************
*** 334,338 ****
// maybe there is a better way to handle this?
if (context.getCurrentLocation().indexOf(_strFilename) > -1) {
! throw makePropertyException(context.getCurrentLocation() + " tried to include itself! You can't do this.");
}
--- 334,339 ----
// maybe there is a better way to handle this?
if (context.getCurrentLocation().indexOf(_strFilename) > -1) {
! String warning = context.getCurrentLocation() + " includes itself.";
! writeWarning(warning, context, out);
}
|