MCPcopy Create free account
hub / github.com/ajkhoury/ReClassEx / PrintError

Method PrintError

ReClass/tinyxml2.cpp:2347–2367  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2345}
2346
2347void 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
2369void XMLDocument::Parse()
2370{

Callers

nothing calls this directly

Calls 4

ErrorFunction · 0.85
TIXML_SNPRINTFFunction · 0.85
GetStrMethod · 0.80
EmptyMethod · 0.45

Tested by

no test coverage detected