Skip to content

Commit d3648e0

Browse files
committed
Add errstr to parse error output
This commit appends the errstr to the parse error output after the get calls if it exists.
1 parent 02125b9 commit d3648e0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/XML/Feed.pm

+5-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ sub parse {
4848
} else {
4949
$xml = $class->get_file($stream);
5050
}
51-
return $class->error("Can't get feed XML content from $stream")
51+
my $errstr = "Can't get feed XML content from $stream";
52+
if ($class->errstr) {
53+
$errstr .= ": " . $class->errstr;
54+
}
55+
return $class->error($errstr)
5256
unless $xml;
5357
my $format;
5458
if ($specified_format) {

0 commit comments

Comments
 (0)