From: antgel Date: Thu, 12 Aug 2010 14:52:06 +0000 (+0000) Subject: Custom error page without throwing logging away. X-Git-Tag: v5.8005~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bf6900ba7094f316737b7ed55ec44dea547f39c0;p=catagits%2FCatalyst-Manual.git Custom error page without throwing logging away. --- diff --git a/lib/Catalyst/Manual/Cookbook.pod b/lib/Catalyst/Manual/Cookbook.pod index 1e0832b..9521beb 100644 --- a/lib/Catalyst/Manual/Cookbook.pod +++ b/lib/Catalyst/Manual/Cookbook.pod @@ -33,9 +33,12 @@ to go into this C method; see L). if ( scalar @{ $c->error } ) { $c->stash->{errors} = $c->error; + for my $error ( @{ $c->error } ) { + $c->log->error($error); + } $c->stash->{template} = 'errors.tt'; $c->forward('MyApp::View::TT'); - $c->error(0); + $c->clear_errors; } return 1 if $c->response->status =~ /^3\d\d$/;