Changeset 1377

Show
Ignore:
Timestamp:
08/18/06 21:58:54
Author:
miyagawa
Message:

EntryFullText?: log Xpath failure

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/lib/Plagger/Plugin/Filter/EntryFullText.pm

    r1348 r1377  
    257257        for my $capture (keys %{$self->{extract_xpath}}) { 
    258258            my @children = $tree->findnodes($self->{extract_xpath}->{$capture}); 
    259             $data->{$capture} = $children[0]->as_HTML; 
     259            if (@children) { 
     260                $data->{$capture} = $children[0]->as_HTML; 
     261            } else { 
     262                Plagger->context->log(error => "Can't find node matching $self->{extract_xpath}->{$capture}"); 
     263            } 
    260264        } 
    261265    }