[Templates] Template::ERROR
Kate Yoak
kate at yoak.com
Wed Jan 9 20:05:29 GMT 2008
Hey guys, I am new here and new to TT.
I would like to address the errors generated by Template->process() directly
in my Apache handler and figure out different error types.
For instance, I'd like to return a 404 if a template could not be found.
Sure, I could parse the $Template::ERROR text - but it seems like there
ought to be a better way to do it.
I read a lot of documentation concerning using try/catch inside a template
but none for how to do it in code. I tried the common try/catch syntax
associated with Error.pm - but that doesn't work.
Has anyone tried to trap exceptions in perl code directly? what's the
syntax?
Is Template::ERROR related to an exception object? How do I retrieve the
object?
Thanks for the help!
Cheers,
Kate
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.template-toolkit.org/pipermail/templates/attachments/20080109/b62fd22a/attachment.htm
More information about the templates
mailing list