summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2014-02-28 01:18:21 +0100
committerFlorent Le Coz <louiz@louiz.org>2014-02-28 01:18:21 +0100
commitdb6ea52b44b2e6f2c03c818ffa94af93976f78c5 (patch)
treeded67017c5ae3d9536d981d70460249417dce6cd /src
parent86d4347af8532ef85472e47c01d645fa5ad1b3b1 (diff)
downloadbiboumi-db6ea52b44b2e6f2c03c818ffa94af93976f78c5.tar.gz
biboumi-db6ea52b44b2e6f2c03c818ffa94af93976f78c5.tar.bz2
biboumi-db6ea52b44b2e6f2c03c818ffa94af93976f78c5.tar.xz
biboumi-db6ea52b44b2e6f2c03c818ffa94af93976f78c5.zip
Provide details about what error the XML parser encountered
Diffstat (limited to 'src')
-rw-r--r--src/xmpp/xmpp_parser.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/xmpp/xmpp_parser.cpp b/src/xmpp/xmpp_parser.cpp
index 9fcc16c..064453e 100644
--- a/src/xmpp/xmpp_parser.cpp
+++ b/src/xmpp/xmpp_parser.cpp
@@ -51,7 +51,8 @@ int XmppParser::feed(const char* data, const int len, const bool is_final)
{
int res = XML_Parse(this->parser, data, len, is_final);
if (res == 0)
- log_error("Xml_Parse encountered an error");
+ log_error("Xml_Parse encountered an error: " <<
+ XML_ErrorString(XML_GetErrorCode(this->parser)))
return res;
}
@@ -59,7 +60,8 @@ int XmppParser::parse(const int len, const bool is_final)
{
int res = XML_ParseBuffer(this->parser, len, is_final);
if (res == 0)
- log_error("Xml_Parsebuffer encountered an error");
+ log_error("Xml_Parsebuffer encountered an error: " <<
+ XML_ErrorString(XML_GetErrorCode(this->parser)));
return res;
}