Branch Coverage

blib/lib/Dancer2/Core/Error.pm
Criterion Covered Total %
branch 55 64 85.9


line true false branch
100 131 1 if (my $msg = "Dancer2::Core::HTTP"->status_message($self->status))
119 6 113 if $engine->pathname_exists($engine->view_pathname($self->status))
140 111 2 unless open my $fh, "<", $filename
152 105 10 $self->has_app && $self->app->has_request ? :
157 7 108 $show_fullmsg ? :
220 8 130 if $self->has_app and $self->app->has_serializer_engine
229 132 9 if $self->has_app
287 10 124 if ($self->serializer)
293 5 5 if $self->has_exception
301 6 118 if ($self->has_app and $self->template)
316 2 4 if $@
319 4 2 if defined $content
323 113 7 unless ($self->show_stacktrace and $self->status eq 500)
324 2 111 if (my $content = $self->static_page)
329 3 110 if ($self->has_app and $self->app->config->{'error_template'})
340 0 3 if $@
343 3 0 if defined $content
351 1 132 if @_
353 0 133 unless $self->response
356 128 5 if $self->has_app
365 128 5 if $self->has_app
376 7 0 if ($self->exception)
377 0 7 if $message
387 3 4 unless $file and $line
390 3 4 unless $file and $line
393 0 4 unless my $fh = eval { do { open_file("<", $file) } }
400 4 0 $line - 5 > 1 ? :
401 4 0 $line + 5 < @lines ? :
407 4 40 $l == $line ? :
432 7 6 if ($censored)
448 13 26 $_ ? :
476 0 172 unless defined $value