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:
@@ -38,7 +38,7 @@ void PercentageDisplay::LoadFromNode( const RString& sDir, const XNode* pNode )
|
||||
|
||||
const XNode *pChild = pNode->GetChild( "Percent" );
|
||||
if( pChild == NULL )
|
||||
RageException::Throw( ssprintf("PercentageDisplay in \"%s\" is missing the node \"Percent\"", sDir.c_str()) );
|
||||
RageException::Throw( "PercentageDisplay in \"%s\" is missing the node \"Percent\".", sDir.c_str() );
|
||||
m_textPercent.LoadFromNode( sDir, pChild );
|
||||
this->AddChild( &m_textPercent );
|
||||
|
||||
@@ -46,7 +46,7 @@ void PercentageDisplay::LoadFromNode( const RString& sDir, const XNode* pNode )
|
||||
{
|
||||
const XNode *pChild = pNode->GetChild( "PercentRemainder" );
|
||||
if( pChild == NULL )
|
||||
RageException::Throw( ssprintf("ComboGraph in \"%s\" is missing the node \"PercentRemainder\"", sDir.c_str()) );
|
||||
RageException::Throw( "ComboGraph in \"%s\" is missing the node \"PercentRemainder\".", sDir.c_str() );
|
||||
m_textPercentRemainder.LoadFromNode( sDir, pChild );
|
||||
this->AddChild( &m_textPercentRemainder );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user