r9064@llin: dpavlin | 2005-11-23 01:15:24 +0100
[webpac2] / lib / WebPAC / DB.pm
index bda66cc..f9e58e0 100644 (file)
@@ -198,8 +198,11 @@ sub save_ds {
 
        $log->logdie("save_ds without cache_file -- did you called gs_get before?") unless ($self->{'cache_file'});
 
-       foreach my $e (qw/ds current_filename headline/) {
-               $log->warn("missing $e") unless $arg->{$e};
+       $log->logdie("need ds") unless ($arg->{ds});
+
+       foreach my $e (qw/current_filename headline/) {
+               my $mfn = $arg->{ds}->{000}->[0] || '?';
+               $log->warn("missing $e in record $mfn") unless $arg->{$e};
        }
 
        $log->debug("creating storable cache file ",$self->{'cache_file'});