Skip to content

Commit

Permalink
Bug 6001 : batchRebuildBiblioTables.pl doesn't crash anymore when Get…
Browse files Browse the repository at this point in the history
…MarcBiblio fails. Unprocessed biblionumbers are displayed at the end of the execution instead.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
  • Loading branch information
veggiematts authored and ranginui committed Apr 28, 2011
1 parent e8b7b29 commit a9cb5fa
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions misc/batchRebuildBiblioTables.pl
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,14 @@ BEGIN
$sth->execute;
# my ($biblionumbermax) = $sth->fetchrow;
# warn "$biblionumbermax <<==";
my @errors;
while (my ($biblionumber)= $sth->fetchrow) {
#now, parse the record, extract the item fields, and store them in somewhere else.
my $record = GetMarcBiblio($biblionumber);
if (not defined $record) {
push @errors, $biblionumber;
next;
}
my @fields = $record->field($tagfield);
my @items;
my $nbitems=0;
Expand All @@ -82,6 +87,9 @@ BEGIN
# $dbh->do("unlock tables");
my $timeneeded = time() - $starttime;
print "$i MARC record done in $timeneeded seconds\n";
if (scalar(@errors) > 0) {
print "Some biblionumber could not be processed though: ", join(" ", @errors);
}

# modified NEWmodbiblio to jump the MARC part of the biblio modif
# highly faster
Expand Down

0 comments on commit a9cb5fa

Please sign in to comment.