[Catalyst] Error handling strategy wrt /end
Bill Moseley
moseley at hank.org
Sat Jan 28 02:17:57 CET 2006
On Fri, Jan 27, 2006 at 05:09:15PM -0800, Phil Mitchell wrote:
> On 1/26/06, Bill Moseley <moseley at hank.org> wrote:
> >
> >
> > eval { $c->forward('App::V::TT') unless $c->res->body; };
> >
> > # Catch errors in the template
> > # Of course, might not be able to generate templates....
> >
> > if ( @{$c->error} ) {
> > # Already printed???
> > #$c->log->error($_) for @{$c->error};
> > $c->res->status( 500 );
> > $c->error(0);
> > $c->stash->{template} = 'error.tt';
> > $c->forward('App::V::TT');
> > }
>
>
> Interesting... why do you use an eval block here?
To see if anyone actually reads my posts. I'm never sure.
Good point. I was thinking the end was already inside the eval.
Maybe it's just how I hoped it would work.
See Tatsuhiko Miyagawa's post " $c->forward and Exception ".
--
Bill Moseley
moseley at hank.org
More information about the Catalyst
mailing list