[Catalyst] Custom finalize_error

Jason Kohles email at jasonkohles.com
Mon Apr 2 21:19:12 GMT 2007


On Apr 2, 2007, at 4:13 PM, Jim Spath wrote:

> I wanted to get rid of the "Please come back later" error page, so  
> I defined my own finalize_error() in MyApp.pm as mentioned in this  
> post:
>
> http://www.mail-archive.com/catalyst@lists.rawmode.org/msg04542.html
>
> It looks like:
>
> sub finalize_error {
>   my ($self, $c) = @_;
>
>   $c->stash->{'template'} = 'error.tt2';
>
> }
>
> The "Please come back later" page no longer appears, but now the  
> page is simply blank.  I've double checked to make sure the  
> error.tt2 template is accessible via Catalyst and it is, so I'm  
> unsure where to go from here.
>
finalize_error is called long after the view processing has already  
been done, if you want to use a template to put a page there, you  
have to build your own Template object and process the template  
yourself.

-- 
Jason Kohles
email at jasonkohles.com
http://www.jasonkohles.com/
"A witty saying proves nothing."  -- Voltaire





More information about the Catalyst mailing list