]> git.stg.codes - stg.git/commitdiff
Show more information abot XML parsing error.
authorMaxim Mamontov <faust.madf@gmail.com>
Sat, 13 Sep 2014 21:59:43 +0000 (00:59 +0300)
committerMaxim Mamontov <faust.madf@gmail.com>
Sat, 13 Sep 2014 21:59:43 +0000 (00:59 +0300)
stglibs/srvconf.lib/servconf.cpp

index 4c69c813da26bf8d066ddfa89e33a8be2801a6aa..78db78c8fd8f335d696c984d52821aa1d1624b1f 100644 (file)
@@ -107,9 +107,10 @@ SERVCONF::IMPL * sc = static_cast<SERVCONF::IMPL *>(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<int>(XML_GetCurrentLineNumber(sc->parser)),
-              XML_ErrorString(XML_GetErrorCode(sc->parser)));
+              static_cast<int>(XML_GetCurrentColumnNumber(sc->parser)),
+              XML_ErrorString(XML_GetErrorCode(sc->parser)), (int)final);
     printf("%s\n", sc->errorMsg.c_str());
     return false;
     }