Skip to content

Commit

Permalink
Fixed a bug where errors are not printed to psgi.errors without Stack…
Browse files Browse the repository at this point in the history
…Trace, since they are stored

in $_ not $@ with Try::Tiny
  • Loading branch information
miyagawa committed Jan 4, 2010
1 parent 924d09f commit 202dc64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Plack/Util.pm
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ sub run_app($$) {
$app->($env);
} catch {
my $body = "Internal Server Error";
$env->{'psgi.errors'}->print($@);
$env->{'psgi.errors'}->print($_);
return [ 500, [ 'Content-Type' => 'text/plain', 'Content-Length' => length($body) ], [ $body ] ];
}
}
Expand Down

0 comments on commit 202dc64

Please sign in to comment.