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:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user