fix line number tracker. error msg wip

This commit is contained in:
Lee Thomason 2017-10-10 17:08:12 -07:00
parent aa1883928b
commit 714ccfe29b
2 changed files with 5 additions and 0 deletions

View File

@ -2301,6 +2301,7 @@ void XMLDocument::SetError( XMLError error, int lineNum, const char* format, ...
{
TIXMLASSERT( error >= 0 && error < XML_ERROR_COUNT );
_errorID = error;
_errorLineNum = lineNum;
_errorStr.Reset();
if (format) {

View File

@ -499,9 +499,13 @@ int main( int argc, const char ** argv )
int value2 = doc->FirstChildElement()->LastChildElement()->IntAttribute( "attrib", replacementIntValue );
XMLError result = doc->FirstChildElement()->LastChildElement()->QueryIntAttribute( "attrib", &value1 );
XMLTest( "Programmatic DOM", XML_NO_ATTRIBUTE, result );
doc->PrintError();
XMLTest( "Programmatic DOM", defaultIntValue, value1 );
XMLTest( "Programmatic DOM", replacementIntValue, value2 );
exit(0);
doc->Print();
{