[cgiapp] $self->tt_error() ?

gvim gvimrc at gmail.com
Fri May 20 08:18:14 EDT 2011


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 generally just let these errors bubble up and let the
> CGI:Application error handler deal with it.
>
> Cheers,
>
> Cees
>

What about error logs, though. My converted CA/TT app currently gives "Premature end of script headers" errors. Nothing more. I've checked all the usual suspects and converted everything to:

return $c->tt_process( ...

Removed all:

print header();

Still no luck.

gvim


More information about the cgiapp mailing list