$sth->execute();
my $i=0;
while (my ($authid) = $sth->fetchrow) {
- my $record = GetAuthority($authid);
+ my $record;
+ eval {
+ $record = GetAuthority($authid);
+ };
+ if($@){
+ print " There was some pb getting authority : ".$authid."\n";
+ next;
+ }
+
print ".";
print "\r$i" unless ($i++ %100);
# remove leader length, that could be wrong, it will be calculated automatically by as_usmarc
open(OUT,">:utf8 ","$directory/biblios/export") or die $!;
my $dbh=C4::Context->dbh;
my $sth;
- $sth=$dbh->prepare("select biblionumber from biblioitems where biblionumber >54000 order by biblionumber $limit");
+ $sth=$dbh->prepare("select biblionumber from biblioitems order by biblionumber $limit");
$sth->execute();
my $i=0;
while (my ($biblionumber) = $sth->fetchrow) {
- my $record = GetMarcBiblio($biblionumber);
+ my $record;
+ eval {
+ $record = GetMarcBiblio($biblionumber);
+ };
+ if($@){
+ print " There was some pb getting biblio : #".$biblionumber."\n";
+ next;
+ }
# warn $record->as_formatted;
# die if $record->subfield('090','9') eq 11;
# print $record;