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
@@ -108,12 +108,12 @@ void BitmapText::LoadFromNode( const RString& sDir, const XNode* pNode )
RString sFont;
pNode->GetAttrValue( "Font", sFont );
if( sFont.empty() )
pNode->GetAttrValue("File", sFont ); // accept "File" for backward compatibility
pNode->GetAttrValue( "File", sFont ); // accept "File" for backward compatibility
LuaHelpers::RunAtExpressionS( sFont );
if( sFont == "" )
RageException::Throw( "An object '%s' in '%s' is missing the Font attribute",
pNode->m_sName.c_str(), sDir.c_str() );
RageException::Throw( "An object \"%s\" in \"%s\" is missing the Font attribute.",
pNode->m_sName.c_str(), sDir.c_str() );
LoadFromFont( THEME->GetPathF( "", sFont ) );
SetText( sText, sAltText );