koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] koha/misc/cronjobs build_browser_and_cloud.pl


From: Antoine Farnault
Subject: [Koha-cvs] koha/misc/cronjobs build_browser_and_cloud.pl
Date: Fri, 20 Jul 2007 08:34:59 +0000

CVSROOT:        /sources/koha
Module name:    koha
Changes by:     Antoine Farnault <toins>        07/07/20 08:34:59

Modified files:
        misc/cronjobs  : build_browser_and_cloud.pl 

Log message:
        adding an eval to prevent an execption when getting marc biblio

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/misc/cronjobs/build_browser_and_cloud.pl?cvsroot=koha&r1=1.3&r2=1.4

Patches:
Index: build_browser_and_cloud.pl
===================================================================
RCS file: /sources/koha/koha/misc/cronjobs/build_browser_and_cloud.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- build_browser_and_cloud.pl  15 Jun 2007 13:44:46 -0000      1.3
+++ build_browser_and_cloud.pl  20 Jul 2007 08:34:58 -0000      1.4
@@ -54,7 +54,6 @@
 die "no cloud or browser field/subfield defined : nothing to do !" unless 
$browser_tag or $cloud_tag;
 
 my $dbh = C4::Context->dbh;
-my $starttime = time();
 
 my $i=0;
 $|=1; # flushes output
@@ -78,7 +77,14 @@
     $i++;
     print "." unless $batch;
     #now, parse the record, extract the item fields, and store them in 
somewhere else.
-    my $Koharecord = GetMarcBiblio($biblionumber);
+    my $Koharecord;
+    eval{
+           $Koharecord = GetMarcBiblio($biblionumber);
+    };
+    if($@){
+           warn 'pb when getting biblio '.$i.' : '.$@;
+           next;
+    }
     # deal with BROWSER part
     if ($browser_tag) { 
         foreach my $browsed_field 
($Koharecord->subfield($browser_tag,$browser_subfield)) {
@@ -117,8 +123,8 @@
     }
     $classification = dewey_french();
     # calculate end node...
-    use Data::Dumper;
-    warn "==>".Dumper(%browser_result);
+    #use Data::Dumper;
+    #warn "==>".Dumper(%browser_result);
     foreach (keys %browser_result) {
         my $father = substr($_,0,-1);
         $browser_result{$father}->{notendnode}=1;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]