From 0cfa021cfd1395e2f6146d52f9e5ffa64be17976 Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Sun, 14 Sep 2014 00:59:43 +0300 Subject: [PATCH 1/1] Show more information abot XML parsing error. --- stglibs/srvconf.lib/servconf.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stglibs/srvconf.lib/servconf.cpp b/stglibs/srvconf.lib/servconf.cpp index 4c69c813..78db78c8 100644 --- a/stglibs/srvconf.lib/servconf.cpp +++ b/stglibs/srvconf.lib/servconf.cpp @@ -107,9 +107,10 @@ SERVCONF::IMPL * sc = static_cast(data); if (XML_Parse(sc->parser, chunk.c_str(), chunk.length(), final) == XML_STATUS_ERROR) { - strprintf(&sc->errorMsg, "XML parse error at line %d: %s", + strprintf(&sc->errorMsg, "XML parse error at line %d, %d: %s. Is final: %d", static_cast(XML_GetCurrentLineNumber(sc->parser)), - XML_ErrorString(XML_GetErrorCode(sc->parser))); + static_cast(XML_GetCurrentColumnNumber(sc->parser)), + XML_ErrorString(XML_GetErrorCode(sc->parser)), (int)final); printf("%s\n", sc->errorMsg.c_str()); return false; } -- 2.44.2