From 8989428785dcce46989da924c911b969c0a69a0a Mon Sep 17 00:00:00 2001 From: MJ Ray Date: Wed, 13 Oct 2010 02:17:05 +0100 Subject: [PATCH] Display available error information during bulkmarcimport (cherry picked from commit 65f8573b5d414591d22ce1b0d60afea9293f5704) Signed-off-by: Chris Nighswonger --- misc/migration_tools/bulkmarcimport.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc/migration_tools/bulkmarcimport.pl b/misc/migration_tools/bulkmarcimport.pl index 56d2eed33f..3bb9ed85d9 100755 --- a/misc/migration_tools/bulkmarcimport.pl +++ b/misc/migration_tools/bulkmarcimport.pl @@ -169,13 +169,14 @@ RECORD: while ( ) { # get records eval { $record = $batch->next() }; if ( $@ ) { - print "Bad MARC record: skipped\n"; + print "Bad MARC record $i: $@ skipped\n"; # FIXME - because MARC::Batch->next() combines grabbing the next # blob and parsing it into one operation, a correctable condition # such as a MARC-8 record claiming that it's UTF-8 can't be recovered # from because we don't have access to the original blob. Note # that the staging import can deal with this condition (via # C4::Charset::MarcToUTF8Record) because it doesn't use MARC::Batch. + $i++; next; } # skip if we get an empty record (that is MARC valid, but will result in AddBiblio failure -- 2.39.5