diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2022-03-02 10:19:17 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2022-03-02 10:19:50 -0700 |
commit | fb4110b5cd5bc924770671095c895c744aa15333 (patch) | |
tree | 88be93c9df9db336ba93441eb25dcf829c1a8c28 | |
parent | 623ad9228948aebce3696c3b3163c1405498710e (diff) | |
download | mailscripts-fb4110b5cd5bc924770671095c895c744aa15333.tar.gz |
gmi2email: print the URI when there's an XML::Feed exception
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rwxr-xr-x | gmi2email | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -125,7 +125,14 @@ foreach my $sub (<$subs_fh>) { # so also look at the file extension if ($type =~ m{^(?:text|application)/(?:(?:atom|rss)\+)?xml} or $sub =~ /\.xml$/) { - my $feed = XML::Feed->parse(\$data); + my $feed; + #<<< + try { + $feed = XML::Feed->parse(\$data); + } catch { + die "While parsing $sub, XML::Feed exception:\n$_"; + }; + #>>> for ($feed->entries) { my $date = $_->issued // $_->modified; $date = $date->epoch if $date; |