Branch Coverage

blib/lib/Plack/Middleware/PrettyException.pm
Criterion Covered Total %
branch 30 36 83.3


line true false branch
30 9 7 unless (eval {
33 7 2 if (&blessed($e)) { }
35 7 0 if ($e->can('message')) { }
41 6 0 $e->can('http_status') ? :
1 6 $e->can('status_code') ? :
47 1 6 if ($r->[0] =~ /^3/ and $e->can('location'))
49 1 0 unless $r->[2]
64 2 5 unless ($died or &is_error($r->[0]))
69 1 13 if ($r->[0] =~ /^3/)
77 6 7 unless ($error)
79 5 1 ref $body eq 'ARRAY' ? :
91 2 11 if ($orig_headers->content_type =~ m[application/json]i)
96 4 7 if ($self->force_json or exists $env->{'HTTP_ACCEPT'} and $env->{'HTTP_ACCEPT'} =~ m[application/json]i) { }
102 0 4 if ($exception and $exception->can('does'))
103 0 0 if ($exception->does('Throwable::X'))
135 2 5 if ($exception and $exception->can('does'))
137 1 1 if ($exception->does('Throwable::X'))
145 1 1 if (@more)