On Tue, Mar 18, 2003 at 11:46:54AM +0000, Andy Wardley wrote: > Bradley Baetz wrote: > > Yeah, but this is from perl. I don't want to process this - I wnt to do > > this up front, before any processing. Its the top level file, not > > something PROCESSed later. > > The context template() method is what you're looking for.
Right, but see my first method - I can't differentiate between the various errors. > > And I still couldn't differentiate between syntax errors, and file not > > found - I can do the [% TRY %] equivelent in the perl directly. > > You need to look for a 'file' error that is prefixed 'parse error: '. > Well, I'm looking for file not found errors. The template() method does: $self->throw(Template::Constants::ERROR_FILE, "$name: not found"); at the end. Will a match on /: not found$/ always match a file not found error, and nothing else? And will this message avoid changing in the future for some reason? Bradley _______________________________________________ templates mailing list [EMAIL PROTECTED] http://lists.template-toolkit.org/mailman/listinfo/templates
