Skip to content

Commit 53a4896

Browse files
committed
Use ignorable error for inconsistent function end line assignment.
Signed-off-by: Henry Cox <[email protected]>
1 parent 82310ca commit 53a4896

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lib/lcovutil.pm

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2506,9 +2506,13 @@ sub end_line
25062506
sub set_end_line
25072507
{
25082508
my ($self, $line) = @_;
2509-
die('bad end line ' . $self->file() .
2510-
":$line for " . $self->name() . " start: " . $self->line())
2511-
unless ($line >= $self->line());
2509+
if ($line < $self->line()) {
2510+
lcovutil::ignorable_error($lcovutil::ERROR_INCONSISTENT_DATA,
2511+
'"' . $self->file() . '":' . $self->line() .
2512+
': function ' . $self->name() .
2513+
" end line $line less than start line");
2514+
return;
2515+
}
25122516
$self->[5] = $line;
25132517
}
25142518

0 commit comments

Comments
 (0)