Use CCLOG instead of CCMessageBox to report file system errors

This commit is contained in:
folecr 2013-02-21 15:50:57 -08:00
parent 8408fc6d1b
commit f26f254daa
2 changed files with 4 additions and 6 deletions

View File

@ -383,13 +383,12 @@ unsigned char* CCFileUtils::getFileData(const char* pszFileName, const char* psz
fclose(fp);
} while (0);
if (! pBuffer && isPopupNotify())
if (! pBuffer)
{
std::string title = "Notification";
std::string msg = "Get data from file(";
msg.append(pszFileName).append(") failed!");
CCMessageBox(msg.c_str(), title.c_str());
CCLOG(msg.c_str());
}
return pBuffer;
}

View File

@ -143,12 +143,11 @@ unsigned char* CCFileUtilsAndroid::getFileData(const char* pszFileName, const ch
} while (0);
}
if (! pData && isPopupNotify())
if (! pData)
{
std::string title = "Notification";
std::string msg = "Get data from file(";
msg.append(pszFileName).append(") failed!");
CCMessageBox(msg.c_str(), title.c_str());
CCLOG(msg.c_str());
}
return pData;