Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re^2: Catching Template Toolkit Errors

by Herkum (Parson)
on Mar 19, 2007 at 11:55 UTC ( #605462=note: print w/replies, xml ) Need Help??

in reply to Re: Catching Template Toolkit Errors
in thread Catching Template Toolkit Errors

I looked at the piece of code that you mentioned and maybe part of the problem is that I am using cpan:://CGI::Application::Plugin::TT The plugin does not mention much in reference to Template errors except that I can have an 'Error' runmode to display the an error template.

I was hoping there was a variable that could be set when initializing the Template configuration that would force the template to die with the error message or stick the error in a value that is accessible by the template.

Update: I am also wondering if might have to do with the way CGI::Application handles carp calls on a Win32 box. I looked at the source code for the plugin and it calls croak which, I don't think should be a problem, but I am not sure how it is being handled.

Update 2: Evidently CGI::Application does its own eval on executed code and sticks in the $@ variable and will call the error runmode. I cannot wait to get home to see if this works.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://605462]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2022-05-26 10:36 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (93 votes). Check out past polls.