Cleanup RageException::Throw(). Do not use ssprintf() inside of Throw() and do not pass it bare error messages. Use RageException::Throw( "%s", sError.c_str() ); instead. Be consistent with quoting file names "%s" and theme metrics as "%s : %s". Try to make them complete English sentences when possible.

This commit is contained in:
Steve Checkoway
2006-09-17 01:19:19 +00:00
parent c9fa49b7ba
commit 6ea2a41b00
38 changed files with 113 additions and 123 deletions
+3 -3
View File
@@ -51,11 +51,11 @@ void AnimatedTexture::Load( const RString &sTexOrIniPath )
{
IniFile ini;
if( !ini.ReadFile( sTexOrIniPath ) )
RageException::Throw( "Error reading %s: %s", sTexOrIniPath.c_str(), ini.GetError().c_str() );
RageException::Throw( "Error reading \"%s\": %s", sTexOrIniPath.c_str(), ini.GetError().c_str() );
const XNode* pAnimatedTexture = ini.GetChild("AnimatedTexture");
if( pAnimatedTexture == NULL )
RageException::Throw( "The animated texture file '%s' doesn't contain a section called 'AnimatedTexture'.", sTexOrIniPath.c_str() );
RageException::Throw( "The animated texture file \"%s\" doesn't contain a section called \"AnimatedTexture\".", sTexOrIniPath.c_str() );
pAnimatedTexture->GetAttrValue( "TexVelocityX", m_vTexVelocity.x );
pAnimatedTexture->GetAttrValue( "TexVelocityY", m_vTexVelocity.y );
@@ -214,7 +214,7 @@ RageVector2 AnimatedTexture::GetTextureTranslate()
return v;
}
#define THROW RageException::Throw( "Parse error in \"%s\" at line %d: '%s'", sPath.c_str(), iLineNum, sLine.c_str() )
#define THROW RageException::Throw( "Parse error in \"%s\" at line %d: \"%s\".", sPath.c_str(), iLineNum, sLine.c_str() )
bool msAnimation::LoadMilkshapeAsciiBones( RString sAniName, RString sPath )
{