I am reading RSS feeds with XML::FeedPP. It's been working fine for quite some time, but today I got an error on the cron job Invalid string: [\x6A\x74\x61\x62\x6C\x65\x73\x65\x73\x73\x69\x6F\x6E::\x73\x74\x6F\x72\x65 \x66\x61\x69\x6C\x65\x64] before <br /> at /home/perl/usr/lib/perl5/site_perl/5.8.8/XML/FeedPP.pm line 478
Line 478 is where it's parsing the feed, so obviously, there is a squirrely entry in one of the feeds I'm reading, which I'm tracking down.
But I was surprised to get this error in the first place because I'm invoking the feed inside an eval to guard against such an event, i.e. eval { $feed = XML::FeedPP->new( $feedurl ) }; Will this not trap errors that occur inside the module? If not is there some other way to do that? I don't want my reader to crash every time someone inserts a non-standard element in a feed.
TIA....Steve
In reply to XML::FeedPP how to trap error by cormanaz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |