[Catalyst] Error handling

Matt S Trout dbix-class at trout.me.uk
Tue Oct 25 16:50:23 CEST 2005


On Tue, Oct 25, 2005 at 04:27:55PM +0200, Albert Vila wrote:
> 
> Matt S Trout wrote:
> >On Mon, Oct 24, 2005 at 07:06:46PM +0200, Albert Vila wrote:
> >  
> >>Hello,
> >>
> >>I have a problem trying to configure my catalyst application in order 
> >>to do the error handling in the begin method.
> >>
> >>I have a controller with multiple functions, each function receives the 
> >>same parameter, and I wanna check the parameter integrity in just one 
> >>place.
> >>    
> >
> >If you set $c->error in your 'sub begin' then dispatch should short-circuit
> >and jump straight to the end action afterwards.
> >  
> That's true, but catalyst shows the error screen instead of the template 
> in the stash.

Are you clearing the error in your 'sub end' to indicate it's been handled
and isn't a true error?

-- 
     Matt S Trout       Specialists in Perl consulting, web development, and
  Technical Director    UNIX/Linux systems architecture and automation. Mail
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

 + Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +



More information about the Catalyst mailing list