blib/lib/Plack/Middleware/PrettyException.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
condition | 23 | 30 | 76.6 |
line | !l | l&&!r | l&&r | condition |
---|---|---|---|---|
47 | 7 | 0 | 1 | $r->[0] =~ /^3/ and $e->can("location") |
96 | 8 | 0 | 3 | exists $env->{'HTTP_ACCEPT'} and $env->{'HTTP_ACCEPT'} =~ m[application/json]i |
102 | 3 | 1 | 0 | $exception and $exception->can("does") |
135 | 2 | 3 | 3 | $exception and $exception->can("does") |
line | l | !l | condition |
---|---|---|---|
45 | 6 | 2 | $r->[0] ||= 500 |
78 | 5 | 2 | $r->[2] || 'error not found in body' |
131 | 8 | 0 | $status ||= "unknown HTTP status code" |
132 | 8 | 0 | $error ||= "unknown error" |
139 | 0 | 2 | $exception->message || 'unknown exception message' |
155 | 1 | 0 | $v // "" |
line | l | !l&&r | !l&&!r | condition |
---|---|---|---|---|
64 | 10 | 5 | 2 | $died or &is_error($r->[0]) |
96 | 1 | 3 | 8 | $self->force_json or exists $env->{'HTTP_ACCEPT'} and $env->{'HTTP_ACCEPT'} =~ m[application/json]i |