Clinton Gormley wrote: > Just a feature request: It's rather annoying that file-not-found and > syntax errors both throw 'file' errors. > > I sometimes want to use a custom template if it exists, otherwise fall > back to the default. > > But using "CATCH file" makes it difficult to debug, as any syntax errors > are also caught by this directive. > > Can I propose an error of type 'syntax'?
The only problem with this would be that we might break things if syntax errors are moved from 'file'. I'm pretty sure I have in the past coded around this and switching from file to syntax would break a page or two I have. Of course if it could be left in the 'file' one as well, that'd get around that problem, but it would certainly cause confusion, since users would have to be sure to catch 'syntax' before 'file' if they are checking for file-only problems. I agree with what you say, though. It can be kind of annoying as you have to use regexp's to figure out what's going on. -- Josh _______________________________________________ templates mailing list templates@template-toolkit.org http://mail.template-toolkit.org/mailman/listinfo/templates