[cgiapp] $self->tt_error() ?

Cees Hek ceeshek at gmail.com
Thu May 19 19:24:26 EDT 2011


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
CGI:Application error handler deal with it.

Cheers,

Cees

On Thu, May 19, 2011 at 11:35 PM, gvim <gvimrc at gmail.com> wrote:
> 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 message delivery options,  ##
> ##  visit:  http://lists.openlib.org/mailman/listinfo/cgiapp    ##
> ##                                                            ##
> ##  Web archive:   http://lists.openlib.org/pipermail/cgiapp/   ##
> ##  Wiki:          http://cgiapp.erlbaum.net/                 ##
> ##                                                            ##
> ################################################################
>
>


More information about the cgiapp mailing list