[cgiapp] $self->tt_error() ?

Ron Savage ron at savage.net.au
Fri May 20 18:23:39 EDT 2011


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 ($@) {
> >    # 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:

That msg means you sent something to the client before the proper
headers, i.e. the error msg.

Try using CGI's option fatalsToBrowser to get the msg displayed.

> return $c->tt_process( ...
> 
> Removed all:
> 
> print header();
> 
> Still no luck.
> 
> 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/                 ##
> ##                                                            ##
> ################################################################
> 
> 

-- 
Ron Savage
http://savage.net.au/
Ph: 0421 920 622



More information about the cgiapp mailing list