1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2026-01-26 21:41:34 +03:00
Files
libxml2/include/private/error.h
Nick Wellnhofer c5a8aef2f6 error: Refactor error reporting
Introduce xmlStrVASPrintf, trying to handle buggy snprintf
implementations.

Introduce xmlSetError to set errors atomically.

Introduce xmlUpdateError to set an error, fixing up node, file and line.

Introduce helper function xmlRaiseMemoryError.

Make legacy error handlers call xmlReportError, avoiding checks in
xmlVRaiseError.

Remove fragile support for getting file and line info from XInclude
nodes.
2023-12-21 02:46:27 +01:00

36 lines
1.4 KiB
C

#ifndef XML_ERROR_H_PRIVATE__
#define XML_ERROR_H_PRIVATE__
#include <libxml/xmlerror.h>
#include <libxml/xmlversion.h>
#define MAX_ERR_MSG_SIZE 64000
struct _xmlNode;
XML_HIDDEN void
xmlRaiseMemoryError(xmlStructuredErrorFunc schannel, xmlGenericErrorFunc channel,
void *data, int domain, xmlError *error);
XML_HIDDEN int
xmlVRaiseError(xmlStructuredErrorFunc schannel, xmlGenericErrorFunc channel,
void *data, void *ctx, struct _xmlNode *node,
int domain, int code, xmlErrorLevel level,
const char *file, int line, const char *str1,
const char *str2, const char *str3, int int1, int col,
const char *msg, va_list ap);
XML_HIDDEN int
__xmlRaiseError(xmlStructuredErrorFunc schannel, xmlGenericErrorFunc channel,
void *data, void *ctx, struct _xmlNode *node,
int domain, int code, xmlErrorLevel level,
const char *file, int line, const char *str1,
const char *str2, const char *str3, int int1, int col,
const char *msg, ...) LIBXML_ATTR_FORMAT(16,17);
XML_HIDDEN void
__xmlSimpleError(int domain, int code, struct _xmlNode *node,
const char *msg, const char *extra) LIBXML_ATTR_FORMAT(4,0);
XML_HIDDEN void
xmlGenericErrorDefaultFunc(void *ctx, const char *msg,
...) LIBXML_ATTR_FORMAT(2,3);
#endif /* XML_ERROR_H_PRIVATE__ */