1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-26 00:37:43 +03:00

xpath: Improve error handling

Introduce xmlXPathSetErrorHandler allowing to set a structured error
handler for an XPath context.

Remove arguments from memory error handlers.

Use xmlRaiseMemoryError.

Remove TODO, STRANGE and CHECK_CTXT macros.

Remove remaining uses of xmlGenericError.
This commit is contained in:
Nick Wellnhofer
2023-12-18 19:39:38 +01:00
parent 54c70ed57f
commit 954b898494
4 changed files with 248 additions and 358 deletions

View File

@@ -515,6 +515,10 @@ XMLPUBFUN xmlXPathContextPtr
xmlXPathNewContext (xmlDocPtr doc);
XMLPUBFUN void
xmlXPathFreeContext (xmlXPathContextPtr ctxt);
XMLPUBFUN void
xmlXPathSetErrorHandler(xmlXPathContextPtr ctxt,
xmlStructuredErrorFunc handler,
void *context);
XMLPUBFUN int
xmlXPathContextSetCache(xmlXPathContextPtr ctxt,
int active,