Changed many uses of Dialog::OK and LOG->Warn to use ReportScriptError.

This commit is contained in:
Kyzentun
2014-07-07 00:39:27 -06:00
parent ff1392cdba
commit 026f968fa4
31 changed files with 119 additions and 118 deletions
+5 -5
View File
@@ -905,7 +905,7 @@ ProfileLoadResult Profile::LoadAllFromDir( RString sDir, bool bRequireSignature
int iBytes = pFile->GetFileSize();
if( iBytes > MAX_PLAYER_STATS_XML_SIZE_BYTES )
{
LOG->Warn( "The file '%s' is unreasonably large. It won't be loaded.", fn.c_str() );
LuaHelpers::ReportScriptErrorFmt( "The file '%s' is unreasonably large. It won't be loaded.", fn.c_str() );
return ProfileLoadResult_FailedTampered;
}
}
@@ -919,7 +919,7 @@ ProfileLoadResult Profile::LoadAllFromDir( RString sDir, bool bRequireSignature
// verify the stats.xml signature with the "don't share" file
if( !CryptManager::VerifyFileWithFile(sStatsXmlSigFile, sDontShareFile) )
{
LOG->Warn( "The don't share check for '%s' failed. Data will be ignored.", sStatsXmlSigFile.c_str() );
LuaHelpers::ReportScriptErrorFmt( "The don't share check for '%s' failed. Data will be ignored.", sStatsXmlSigFile.c_str() );
return ProfileLoadResult_FailedTampered;
}
LOG->Trace( "Done." );
@@ -928,7 +928,7 @@ ProfileLoadResult Profile::LoadAllFromDir( RString sDir, bool bRequireSignature
LOG->Trace( "Verifying stats.xml signature" );
if( !CryptManager::VerifyFileWithFile(fn, sStatsXmlSigFile) )
{
LOG->Warn( "The signature check for '%s' failed. Data will be ignored.", fn.c_str() );
LuaHelpers::ReportScriptErrorFmt( "The signature check for '%s' failed. Data will be ignored.", fn.c_str() );
return ProfileLoadResult_FailedTampered;
}
LOG->Trace( "Done." );
@@ -1065,7 +1065,7 @@ bool Profile::SaveStatsXmlToDir( RString sDir, bool bSignData ) const
RageFile f;
if( !f.Open(fn, RageFile::WRITE) )
{
LOG->Warn( "Couldn't open %s for writing: %s", fn.c_str(), f.GetError().c_str() );
LuaHelpers::ReportScriptErrorFmt( "Couldn't open %s for writing: %s", fn.c_str(), f.GetError().c_str() );
return false;
}
@@ -1288,7 +1288,7 @@ ProfileLoadResult Profile::LoadEditableDataFromDir( RString sDir )
int iBytes = FILEMAN->GetFileSizeInBytes( fn );
if( iBytes > MAX_EDITABLE_INI_SIZE_BYTES )
{
LOG->Warn( "The file '%s' is unreasonably large. It won't be loaded.", fn.c_str() );
LuaHelpers::ReportScriptErrorFmt( "The file '%s' is unreasonably large. It won't be loaded.", fn.c_str() );
return ProfileLoadResult_FailedTampered;
}