Provide details about what error the XML parser encountered
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user