Commit db6ea52b authored by louiz’'s avatar louiz’

Provide details about what error the XML parser encountered

parent 86d4347a
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment