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