Commit 6ad8502d authored by Sebastien Barre's avatar Sebastien Barre

ENH: fix error report location, this wasn't helping if the XML was not...

ENH: fix error report location, this wasn't helping if the XML was not indented properly, or not indented at all (which is not a requirement)
parent 3aca6736
......@@ -33,7 +33,7 @@
#include <ctype.h>
#include <sys/stat.h>
vtkCxxRevisionMacro(vtkXMLParser, "1.27");
vtkCxxRevisionMacro(vtkXMLParser, "1.28");
vtkStandardNewMacro(vtkXMLParser);
//----------------------------------------------------------------------------
......@@ -455,9 +455,15 @@ void vtkXMLParser::ReportUnknownElement(const char* element)
//----------------------------------------------------------------------------
void vtkXMLParser::ReportXmlParseError()
{
vtkErrorMacro("Error parsing XML in stream at line "
<< XML_GetCurrentLineNumber(static_cast<XML_Parser>(this->Parser))
<< ": " << XML_ErrorString(XML_GetErrorCode(static_cast<XML_Parser>(this->Parser))));
vtkErrorMacro(
"Error parsing XML in stream at line "
<< XML_GetCurrentLineNumber(static_cast<XML_Parser>(this->Parser))
<< ", column "
<< XML_GetCurrentColumnNumber(static_cast<XML_Parser>(this->Parser))
<< ", byte index "
<< XML_GetCurrentByteIndex(static_cast<XML_Parser>(this->Parser))
<< ": "
<< XML_ErrorString(XML_GetErrorCode(static_cast<XML_Parser>(this->Parser))));
}
//----------------------------------------------------------------------------
......
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