On Wed, 6 Aug 2003, Edward Tsai wrote: > Ack! Thanks for the help - is there any way I can pipe > these errors to the web browser, much like CGI::Carp > 'fatalstobrowser' and is there a warning / debugging > flag I can put to make the erro more specific?
To see the error in your browser, create a file, such as error.html, that has at least this content: [% error %] and then add this configuration directive: ERROR => 'error.html' and you should see the error in your browser. For more information, see http://template-toolkit.org/docs/aqua/Manual/Config.html . I don't know of a way to make the error message more specific. Perhaps you could do something with TRY/THROW/CATCH (see http://template-toolkit.org/docs/aqua/Manual/Directives.html#Exception_Handling_and_Flow_Control). Dave > -Edward > --- Bryce Harrington <[EMAIL PROTECTED]> wrote: > > On Wed, 6 Aug 2003, Edward Tsai wrote: > > > > > Hello everyone, > > > > > > I'm getting the following error from the following > > > file > > > > > > Template process failed: > > > Template::Constants::ERROR_FILE error - parse > > error - > > > request.html.tmpl line 10: unexpected end of input > > > > > > from > > > > > > [% INCLUDE header > > > title = 'TEmplate Toolikt' > > > %] > > > > > > <ul> > > > [% FOREACH person = login_name %] > > > <li> loginname is [% person %] > > > > [% END %] > > > > > </ul> > > > > > > [% INCLUDE footer %] > > > > > > which is called from another file referencing > > > > > > my $template = Template->new({ > > > INCLUDE_PATH => > > > > > > '/home/etsai/scrs/templates/src:/home/etsai/scrs/templates/lib', > > > PRE_PROCESS => 'config', > > > }); > > > > > > $template->process('request.html.tmpl', $vars) > > > || die "Template process failed: > > ",$template->error(), > > > "\n"; > > > } > > > > > > > > > and the standard header footer files are under > > > /home/etsai/scrs/templates/lib > > > > > > Thank you, > > > > > > -Edward > > > > > > __________________________________ > > > Do you Yahoo!? > > > Yahoo! SiteBuilder - Free, easy-to-use web site > > design software > > > http://sitebuilder.yahoo.com > > > > > > _______________________________________________ > > > templates mailing list > > > [EMAIL PROTECTED] > > > > > > http://lists.template-toolkit.org/mailman/listinfo/templates > > > > > > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > > _______________________________________________ > templates mailing list > [EMAIL PROTECTED] > http://lists.template-toolkit.org/mailman/listinfo/templates _______________________________________________ templates mailing list [EMAIL PROTECTED] http://lists.template-toolkit.org/mailman/listinfo/templates
