Re: [cgiapp] $self-tt_error() ?

2011-05-20 Thread gvim
On 20/05/2011 00:24, Cees Hek wrote: The plugin throws an error if processing a template fails. So you can wrap your calls to tt_process in an eval and catch any errors. my $output = eval { $self-tt_process({}) }; if ($@) { # Something went wrong } else { return $output } I

Re: [cgiapp] $self-tt_error() ?

2011-05-20 Thread Ron Savage
Hi gvim On Fri, 2011-05-20 at 13:18 +0100, gvim wrote: On 20/05/2011 00:24, Cees Hek wrote: The plugin throws an error if processing a template fails. So you can wrap your calls to tt_process in an eval and catch any errors. my $output = eval { $self-tt_process({}) }; if ($@) { #

[cgiapp] $self-tt_error() ?

2011-05-19 Thread gvim
I'm using CA::Plugin::TT and there's no mention in the docs of a corresponding method for $tt-error(), ie. $self-tt_error(). gvim # CGI::Application community mailing list #### ## To unsubscribe, or change your

Re: [cgiapp] $self-tt_error() ?

2011-05-19 Thread Cees Hek
The plugin throws an error if processing a template fails. So you can wrap your calls to tt_process in an eval and catch any errors. my $output = eval { $self-tt_process({}) }; if ($@) { # Something went wrong } else { return $output } I generally just let these errors bubble up and let the