Skip to content

Commit

Permalink
Add errstr to parse error output
Browse files Browse the repository at this point in the history
This commit appends the errstr to the parse error output after
the get calls if it exists.
  • Loading branch information
renderorange committed Jul 6, 2024
1 parent 02125b9 commit d3648e0
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 d3648e0

Please sign in to comment.