| 2345 | } |
| 2346 | |
| 2347 | void XMLDocument::PrintError() const |
| 2348 | { |
| 2349 | if ( Error() ) { |
| 2350 | static const int LEN = 20; |
| 2351 | char buf1[LEN] = { 0 }; |
| 2352 | char buf2[LEN] = { 0 }; |
| 2353 | |
| 2354 | if ( !_errorStr1.Empty() ) { |
| 2355 | TIXML_SNPRINTF( buf1, LEN, "%s", _errorStr1.GetStr() ); |
| 2356 | } |
| 2357 | if ( !_errorStr2.Empty() ) { |
| 2358 | TIXML_SNPRINTF( buf2, LEN, "%s", _errorStr2.GetStr() ); |
| 2359 | } |
| 2360 | |
| 2361 | // Should check INT_MIN <= _errorID && _errorId <= INT_MAX, but that |
| 2362 | // causes a clang "always true" -Wtautological-constant-out-of-range-compare warning |
| 2363 | TIXMLASSERT( 0 <= _errorID && XML_ERROR_COUNT - 1 <= INT_MAX ); |
| 2364 | printf( "XMLDocument error id=%d '%s' str1=%s str2=%s line=%d\n", |
| 2365 | static_cast<int>( _errorID ), ErrorName(), buf1, buf2, _errorLineNum ); |
| 2366 | } |
| 2367 | } |
| 2368 | |
| 2369 | void XMLDocument::Parse() |
| 2370 | { |
nothing calls this directly
no test coverage detected