Skip to content

Commit

Permalink
Merge pull request #62 from renderorange/add-errstr-to-parse-error
Browse files Browse the repository at this point in the history
Add errstr to parse error output
  • Loading branch information
davorg authored Jul 7, 2024
2 parents 02125b9 + d3648e0 commit 30c9ac6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/XML/Feed.pm
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ sub parse {
} else {
$xml = $class->get_file($stream);
}
return $class->error("Can't get feed XML content from $stream")
my $errstr = "Can't get feed XML content from $stream";
if ($class->errstr) {
$errstr .= ": " . $class->errstr;
}
return $class->error($errstr)
unless $xml;
my $format;
if ($specified_format) {
Expand Down

0 comments on commit 30c9ac6

Please sign in to comment.