next if there is an error getting the biblio.
authortoins <toins>
Mon, 11 Jun 2007 15:22:59 +0000 (15:22 +0000)
committertoins <toins>
Mon, 11 Jun 2007 15:22:59 +0000 (15:22 +0000)
misc/migration_tools/rebuild_nozebra.pl

index 471b5a5..ae42c9e 100755 (executable)
@@ -80,8 +80,14 @@ my %result;
 while (my ($biblionumber) = $sth->fetchrow) {
     $i++;
     print "\r$i";
-    my $record = GetMarcBiblio($biblionumber);
-
+    my  $record;
+   eval{
+       $record = GetMarcBiblio($biblionumber);
+   };
+   if($@){
+       print "  There was some pb getting biblionumber : ".$biblionumber."\n";
+       next;
+   }
     # get title of the record (to store the 10 first letters with the index)
     my ($titletag,$titlesubfield) = GetMarcFromKohaField('biblio.title');
     my $title = lc($record->subfield($titletag,$titlesubfield));