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
+5 -5
View File
@@ -157,13 +157,13 @@ void GraphDisplay::LoadFromNode( const RString& sDir, const XNode* pNode )
const XNode *pChild = pNode->GetChild( "Body" );
if( pChild == NULL )
RageException::Throw( ssprintf("ComboGraph in \"%s\" is missing the node \"Body\"", sDir.c_str()) );
RageException::Throw( "ComboGraph in \"%s\" is missing the node \"Body\".", sDir.c_str() );
m_pGraphBody->LoadFromNode( sDir, pChild );
this->AddChild( m_pGraphBody );
pChild = pNode->GetChild( "Texture" );
if( pChild == NULL )
RageException::Throw( ssprintf("ComboGraph in \"%s\" is missing the node \"Texture\"", sDir.c_str()) );
RageException::Throw( "ComboGraph in \"%s\" is missing the node \"Texture\".", sDir.c_str() );
m_sprTexture.LoadFromNode( sDir, pChild );
m_size.x = m_sprTexture->GetUnzoomedWidth();
m_size.y = m_sprTexture->GetUnzoomedHeight();
@@ -171,18 +171,18 @@ void GraphDisplay::LoadFromNode( const RString& sDir, const XNode* pNode )
pChild = pNode->GetChild( "Line" );
if( pChild == NULL )
RageException::Throw( ssprintf("ComboGraph in \"%s\" is missing the node \"Line\"", sDir.c_str()) );
RageException::Throw( "ComboGraph in \"%s\" is missing the node \"Line\".", sDir.c_str() );
m_pGraphLine->LoadFromNode( sDir, pChild );
this->AddChild( m_pGraphLine );
pChild = pNode->GetChild( "SongBoundary" );
if( pChild == NULL )
RageException::Throw( ssprintf("ComboGraph in \"%s\" is missing the node \"SongBoundary\"", sDir.c_str()) );
RageException::Throw( "ComboGraph in \"%s\" is missing the node \"SongBoundary\".", sDir.c_str() );
m_sprSongBoundary.LoadFromNode( sDir, pChild );
pChild = pNode->GetChild( "Barely" );
if( pChild == NULL )
RageException::Throw( ssprintf("ComboGraph in \"%s\" is missing the node \"Barely\"", sDir.c_str()) );
RageException::Throw( "ComboGraph in \"%s\" is missing the node \"Barely\".", sDir.c_str() );
m_sprJustBarely.LoadFromNode( sDir, pChild );
}