#include "libxml.h"
#include <string.h>
#include <stdarg.h>
#include <libxml/parser.h>
#include <libxml/xmlerror.h>
#include <libxml/xmlmemory.h>
#include <libxml/globals.h>
#include "elfgcchack.h"
Go to the source code of this file.
|
void XMLCDECL | xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED, const char *msg,...) LIBXML_ATTR_FORMAT(2 |
|
void | initGenericErrorDefaultFunc (xmlGenericErrorFunc *handler) |
|
void | xmlSetGenericErrorFunc (void *ctx, xmlGenericErrorFunc handler) |
|
void | xmlSetStructuredErrorFunc (void *ctx, xmlStructuredErrorFunc handler) |
|
void | xmlParserPrintFileInfo (xmlParserInputPtr input) |
|
static void | xmlParserPrintFileContextInternal (xmlParserInputPtr input, xmlGenericErrorFunc channel, void *data) |
|
void | xmlParserPrintFileContext (xmlParserInputPtr input) |
|
static void | xmlReportError (xmlErrorPtr err, xmlParserCtxtPtr ctxt, const char *str, xmlGenericErrorFunc channel, void *data) |
|
◆ bottom_error
◆ IN_LIBXML
◆ XML_GET_VAR_STR
◆ initGenericErrorDefaultFunc()
initGenericErrorDefaultFunc: @handler: the handler
Set or reset (if NULL) the default handler for generic errors to the builtin error function.
Definition at line 90 of file error.c.
void XMLCDECL xmlGenericErrorDefaultFunc(void *ctx ATTRIBUTE_UNUSED, const char *msg,...) LIBXML_ATTR_FORMAT(2
XMLPUBVAR xmlGenericErrorFunc xmlGenericError
UINT(* handler)(MSIPACKAGE *)
Referenced by xmlInitParser().
◆ xmlGenericErrorDefaultFunc()
xmlGenericErrorDefaultFunc: @ctx: an error context @msg: the message to display/transmit ...: extra parameters for the message display
Default handler for out of context error messages.
Definition at line 71 of file error.c.
_Check_return_opt_ _CRTIMP int __cdecl vfprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format, va_list _ArgList)
XMLPUBVAR void * xmlGenericErrorContext
Referenced by initGenericErrorDefaultFunc(), xmlSetGenericErrorFunc(), and xmlThrDefSetGenericErrorFunc().
◆ xmlParserPrintFileContext()
xmlParserPrintFileContext: @input: an xmlParserInputPtr input
Displays current context within the input content for error tracking
Definition at line 230 of file error.c.
XMLPUBVAR xmlGenericErrorFunc xmlGenericError
static void xmlParserPrintFileContextInternal(xmlParserInputPtr input, xmlGenericErrorFunc channel, void *data)
GLenum GLenum GLenum input
XMLPUBVAR void * xmlGenericErrorContext
◆ xmlParserPrintFileContextInternal()
xmlParserPrintFileContext: @input: an xmlParserInputPtr input
Displays current context within the input content for error tracking
Definition at line 173 of file error.c.
186 while ((cur >
base) && ((*(cur) ==
'\n') || (*(cur) ==
'\r'))) {
192 (*(cur) !=
'\n') && (*(cur) !=
'\r'))
194 if ((*(cur) ==
'\n') || (*(cur) ==
'\r')) cur++;
196 col =
input->cur - cur;
201 while ((*cur != 0) && (*(cur) !=
'\n') &&
202 (*(cur) !=
'\r') && (
n <
sizeof(
content)-1)) {
213 while ((
n<col) && (
n++ <
sizeof(
content)-2) && (*ctnt != 0)) {
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLenum GLenum GLenum input
Referenced by xmlParserPrintFileContext(), and xmlReportError().
◆ xmlParserPrintFileInfo()
xmlParserPrintFileInfo: @input: an xmlParserInputPtr input
Displays the associated file and line informations for the current input
Definition at line 153 of file error.c.
157 "%s:%d: ",
input->filename,
161 "Entity: line %d: ",
input->line);
XMLPUBVAR xmlGenericErrorFunc xmlGenericError
GLenum GLenum GLenum input
XMLPUBVAR void * xmlGenericErrorContext
◆ xmlReportError()
xmlReportError: @err: the error @ctx: the parser context or NULL @str: the formatted error message
Report an erro with its context, replace the 4 old error/warning routines.
Definition at line 245 of file error.c.
261 if (channel ==
NULL) {
292 channel(
data,
"Entity: line %d: ",
input->line);
297 else if ((
line != 0) &&
301 channel(
data,
"Entity: line %d: ",
line);
304 channel(
data,
"element %s: ",
name);
308 channel(
data,
"parser ");
311 channel(
data,
"namespace ");
315 channel(
data,
"validity ");
318 channel(
data,
"HTML parser ");
321 channel(
data,
"memory ");
324 channel(
data,
"output ");
327 channel(
data,
"I/O ");
330 channel(
data,
"XInclude ");
333 channel(
data,
"XPath ");
336 channel(
data,
"parser ");
339 channel(
data,
"regexp ");
342 channel(
data,
"module ");
345 channel(
data,
"Schemas validity ");
348 channel(
data,
"Schemas parser ");
351 channel(
data,
"Relax-NG parser ");
354 channel(
data,
"Relax-NG validity ");
357 channel(
data,
"Catalog ");
360 channel(
data,
"C14N ");
363 channel(
data,
"XSLT ");
366 channel(
data,
"encoding ");
369 channel(
data,
"schematron ");
372 channel(
data,
"internal buffer ");
375 channel(
data,
"URI ");
385 channel(
data,
"warning : ");
388 channel(
data,
"error : ");
391 channel(
data,
"error : ");
402 channel(
data,
"%s\n",
"out of memory error");
411 channel(
data,
"Entity: line %d: \n", cur->
line);
421 channel(
data,
"%s\n",
err->str1);
422 for (
i=0;
i <
err->int1;
i++)
xmlParserInputPtr * inputTab
GLenum GLuint GLenum GLsizei const GLchar * buf
XMLPUBFUN int XMLCALL xmlStrlen(const xmlChar *str)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
XMLPUBVAR xmlGenericErrorFunc xmlGenericError
static void xmlParserPrintFileContextInternal(xmlParserInputPtr input, xmlGenericErrorFunc channel, void *data)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLenum GLenum GLenum input
XMLPUBVAR void * xmlGenericErrorContext
◆ xmlSetGenericErrorFunc()
xmlSetGenericErrorFunc: @ctx: the new error handling context @handler: the new handler function
Function to reset the handler and the error context for out of context error messages. This simply means that @handler will be called for subsequent error messages while not parsing nor validating. And @ctx will be passed as first argument to @handler One can simply force messages to be emitted to another FILE * than stderr by setting @ctx to this file handle and @handler to NULL. For multi-threaded applications, this must be set separately for each thread.
Definition at line 113 of file error.c.
void XMLCDECL xmlGenericErrorDefaultFunc(void *ctx ATTRIBUTE_UNUSED, const char *msg,...) LIBXML_ATTR_FORMAT(2
XMLPUBVAR xmlGenericErrorFunc xmlGenericError
UINT(* handler)(MSIPACKAGE *)
XMLPUBVAR void * xmlGenericErrorContext
◆ xmlSetStructuredErrorFunc()
void xmlSetStructuredErrorFunc |
( |
void * |
ctx, |
|
|
xmlStructuredErrorFunc |
handler |
|
) |
| |
xmlSetStructuredErrorFunc: @ctx: the new error handling context @handler: the new handler function
Function to reset the handler and the error context for out of context structured error messages. This simply means that @handler will be called for subsequent error messages while not parsing nor validating. And @ctx will be passed as first argument to @handler For multi-threaded applications, this must be set separately for each thread.
Definition at line 134 of file error.c.
XMLPUBVAR xmlStructuredErrorFunc xmlStructuredError
XMLPUBVAR void * xmlStructuredErrorContext
UINT(* handler)(MSIPACKAGE *)