Skip to content

Commit 30c9ac6

Browse files
authored
Merge pull request #62 from renderorange/add-errstr-to-parse-error
Add errstr to parse error output
2 parents 02125b9 + d3648e0 commit 30c9ac6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/XML/Feed.pm

Lines changed: 5 additions & 1 deletion
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)