Skip to content

Commit

Permalink
Cleanup the stacktrace when the error is forced and there's no exception
Browse files Browse the repository at this point in the history
  • Loading branch information
miyagawa committed Nov 2, 2010
1 parent 225080c commit 82f910d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Plack/Middleware/StackTrace.pm
Expand Up @@ -33,7 +33,7 @@ sub call {
my $res = try { $self->app->($env) } catch { $caught = $_ };

if ($trace && ($caught || ($self->force && ref $res eq 'ARRAY' && $res->[0] == 500)) ) {
my $text = $caught . "\n" . $trace->as_string;
my $text = (defined $caught ? "$caught\n" : '') . $trace->as_string;
my $html = $trace->as_html;
$env->{'plack.stacktrace.text'} = $text;
$env->{'plack.stacktrace.html'} = $html;
Expand Down

0 comments on commit 82f910d

Please sign in to comment.