Skip to content
Browse files

xml: report the filename (if any) when parsing files

A generic "failed to parse xml document" message without telling us
which XML file failed is quite unhelpful.

Reviewed-by: Jiri Denemark <>
Signed-off-by: Daniel P. Berrangé <>
  • Loading branch information...
berrange committed Aug 16, 2018
1 parent e6d7be3 commit 350e238f6320def4e7ee6c2c05a6961f6897bc4c
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/util/virxml.c
@@ -847,7 +847,8 @@ virXMLParseHelper(int domcode,

if (virGetLastErrorCode() == VIR_ERR_OK) {
virGenericReportError(domcode, VIR_ERR_XML_ERROR,
"%s", _("failed to parse xml document"));
_("failed to parse xml document '%s'"),
filename ? filename : "[inline data]");
goto cleanup;

0 comments on commit 350e238

Please sign in to comment.
You can’t perform that action at this time.