From b9693d13ef99d3d904a2a9f8226da400fff2c807 Mon Sep 17 00:00:00 2001 From: joey Date: Sun, 30 Jul 2006 05:44:17 +0000 Subject: [PATCH] robustness and etc --- IkiWiki/Plugin/aggregate.pm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/IkiWiki/Plugin/aggregate.pm b/IkiWiki/Plugin/aggregate.pm index 99b26a546..75e6f31d6 100644 --- a/IkiWiki/Plugin/aggregate.pm +++ b/IkiWiki/Plugin/aggregate.pm @@ -93,7 +93,7 @@ sub preprocess (@) { #{{{ return "{url}."\">".$feed->{name}.": ". "".$feed->{message}." (".$feed->{numposts}. - " stored posts; ".$feed->{newposts}." new)"; + " stored posts; ".$feed->{newposts}." new)
"; } # }}} sub delete (@) { #{{{ @@ -192,9 +192,15 @@ FEED: foreach my $feed (values %feeds) { if (! @urls) { $feed->{message}="could not find feed at ".$feed->{feedurl}; IkiWiki::debug($feed->{message}); + next FEED; } foreach my $url (@urls) { - my $f=XML::Feed->parse(URI->new($url)); + my $f=eval{XML::Feed->parse(URI->new($url))}; + if ($@) { + $feed->{message}="feed crashed XML::Feed! $@"; + IkiWiki::debug($feed->{message}); + next FEED; + } if (! $f) { $feed->{message}=XML::Feed->errstr; IkiWiki::debug($feed->{message}); -- 2.26.2