From: Daniel P. Berrangé Date: Thu, 16 Aug 2018 12:08:52 +0000 (+0100) Subject: xml: report the filename (if any) when parsing files X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=350e238f6320def4e7ee6c2c05a6961f6897bc4c;p=libvirt.git 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é --- diff --git a/src/util/virxml.c b/src/util/virxml.c index a03a747e60..d1926f4605 100644 --- a/src/util/virxml.c +++ b/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; }