From: Tomas Doran (t0m) Date: Wed, 8 Jul 2009 11:40:56 +0000 (+0100) Subject: Fix errors not coming out in the backend app for cases like failing to unserialize... X-Git-Tag: 0.0.6~10 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Engine-STOMP.git;a=commitdiff_plain;h=8f0f19f9d2dda14e3fe1b80cddaf076555b75734 Fix errors not coming out in the backend app for cases like failing to unserialize the message --- diff --git a/lib/Catalyst/Controller/MessageDriven.pm b/lib/Catalyst/Controller/MessageDriven.pm index d74452e..2c6c997 100644 --- a/lib/Catalyst/Controller/MessageDriven.pm +++ b/lib/Catalyst/Controller/MessageDriven.pm @@ -86,8 +86,9 @@ sub end : Private { # Custom error handler - steal errors from catalyst and dump them into # the stash, to get them serialized out as the reply. if (scalar @{$c->error}) { - my $error = join "\n", @{$c->error}; - $c->stash->{response} = { status => 'ERROR', error => $error }; + $c->log->error($_) for @{$c->error}; # Log errors in Catalyst + my $error = join "\n", @{$c->error}; + $c->stash->{response} = { status => 'ERROR', error => $error }; $output = $s->serialize( $c->stash->{response} ); $c->clear_errors; $c->response->status(400);