Bug 35141: (QA follow-up) Increment the bad count

Also move earlier print to warn for consistency.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
This commit is contained in:
Marcel de Rooy 2023-10-27 07:21:03 +00:00 committed by Tomas Cohen Arazi
parent 706641e747
commit 3439185bb0
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
1 changed files with 3 additions and 3 deletions

View File

@ -202,10 +202,9 @@ sub process_bib {
my $allowrelink = $args->{allowrelink};
my $biblio = Koha::Biblios->find($biblionumber);
my $record;
eval{ $record = $biblio->metadata->record; };
eval { $record = $biblio->metadata->record; };
unless ( defined $record ) {
print
"\nCould not retrieve bib $biblionumber from the database - record is corrupt.\n";
warn "Could not retrieve bib $biblionumber from the database - record is corrupt.";
$num_bad_bibs++;
return;
}
@ -220,6 +219,7 @@ sub process_bib {
};
if ($@) {
warn "Error while searching for authorities for biblionumber $biblionumber at " . localtime(time);
$num_bad_bibs++;
return;
}