Permalink
Browse files

Custom error page without throwing logging away.

  • Loading branch information...
1 parent 861a0cd commit bf6900ba7094f316737b7ed55ec44dea547f39c0 antgel committed Aug 12, 2010
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/Catalyst/Manual/Cookbook.pod
@@ -33,9 +33,12 @@ to go into this C<end> method; see L<Catalyst::Plugin::FillInForm>).
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$/;

0 comments on commit bf6900b

Please sign in to comment.