1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-21 14:53:44 +03:00

Setting up the framework for structured error reporting, touches a lot of

* HTMLparser.c c14n.c catalog.c error.c globals.c parser.c
  parserInternals.c relaxng.c valid.c xinclude.c xmlIO.c xmlregexp.c
  xmlschemas.c xpath.c xpointer.c include/libxml/globals.h
  include/libxml/parser.h include/libxml/valid.h
  include/libxml/xmlerror.h: Setting up the framework for structured
  error reporting, touches a lot of modules, but little code now
  the error handling trail has been cleaned up.
Daniel
This commit is contained in:
Daniel Veillard
2003-10-10 14:10:40 +00:00
parent d96cce1abe
commit 659e71ec24
20 changed files with 178 additions and 60 deletions

View File

@@ -79,12 +79,12 @@ htmlErrMemory(xmlParserCtxtPtr ctxt, const char *extra)
ctxt->disableSAX = 1;
}
if (extra)
__xmlRaiseError(NULL, NULL, ctxt, NULL, XML_FROM_PARSER,
__xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_PARSER,
XML_ERR_NO_MEMORY, XML_ERR_FATAL, NULL, 0, extra,
NULL, NULL, 0, 0,
"Memory allocation failed : %s\n", extra);
else
__xmlRaiseError(NULL, NULL, ctxt, NULL, XML_FROM_PARSER,
__xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_PARSER,
XML_ERR_NO_MEMORY, XML_ERR_FATAL, NULL, 0, NULL,
NULL, NULL, 0, 0, "Memory allocation failed\n");
}
@@ -104,7 +104,7 @@ htmlParseErr(xmlParserCtxtPtr ctxt, xmlParserErrors error,
const char *msg, const xmlChar *str1, const xmlChar *str2)
{
ctxt->errNo = error;
__xmlRaiseError(NULL, NULL, ctxt, NULL, XML_FROM_HTML, error,
__xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_HTML, error,
XML_ERR_ERROR, NULL, 0,
(const char *) str1, (const char *) str2,
NULL, 0, 0,
@@ -126,7 +126,7 @@ htmlParseErrInt(xmlParserCtxtPtr ctxt, xmlParserErrors error,
const char *msg, int val)
{
ctxt->errNo = error;
__xmlRaiseError(NULL, NULL, ctxt, NULL, XML_FROM_HTML, error,
__xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_HTML, error,
XML_ERR_ERROR, NULL, 0, NULL, NULL,
NULL, val, 0, msg, val);
ctxt->wellFormed = 0;