1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-28 23:14:57 +03:00

xinclude: Report to xmlGenericError

This commit is contained in:
Nick Wellnhofer
2023-12-22 15:14:19 +01:00
parent e8de3401b3
commit 35a4bc50d0

View File

@@ -150,13 +150,25 @@ static void LIBXML_ATTR_FORMAT(4,0)
xmlXIncludeErr(xmlXIncludeCtxtPtr ctxt, xmlNodePtr node, int error,
const char *msg, const xmlChar *extra)
{
xmlStructuredErrorFunc schannel = NULL;
xmlGenericErrorFunc channel = NULL;
void *data = NULL;
int res;
if (ctxt->fatalErr != 0)
return;
ctxt->nbErrors++;
res = __xmlRaiseError(ctxt->errorHandler, NULL, ctxt->errorCtxt,
ctxt, node, XML_FROM_XINCLUDE, error, XML_ERR_ERROR,
schannel = ctxt->errorHandler;
data = ctxt->errorCtxt;
if (schannel == NULL) {
channel = xmlGenericError;
data = xmlGenericErrorContext;
}
res = __xmlRaiseError(schannel, channel, data, ctxt, node,
XML_FROM_XINCLUDE, error, XML_ERR_ERROR,
NULL, 0, (const char *) extra, NULL, NULL, 0, 0,
msg, (const char *) extra);
if (res < 0) {