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:
@@ -35,13 +35,13 @@ void MeterDisplay::LoadFromNode( const RString& sDir, const XNode* pNode )
|
||||
|
||||
RString sExpr;
|
||||
if( !pNode->GetAttrValue( "StreamWidth", sExpr ) )
|
||||
RageException::Throw( "MeterDisplay in " + sDir + " missing StreamWidth attribute" );
|
||||
RageException::Throw( "MeterDisplay in \"%s\" is missing the \"StreamWidth\" attribute.", sDir.c_str() );
|
||||
m_fStreamWidth = LuaHelpers::RunExpressionF( sExpr );
|
||||
|
||||
{
|
||||
RString sStreamPath;
|
||||
if( !pNode->GetAttrValue( "StreamPath", sStreamPath ) )
|
||||
RageException::Throw( "MeterDisplay in " + sDir + " missing StreamPath attribute" );
|
||||
RageException::Throw( "MeterDisplay in \"%s\" is missing the \"StreamPath\" attribute.", sDir.c_str() );
|
||||
|
||||
LuaHelpers::RunAtExpressionS( sStreamPath );
|
||||
if( !sStreamPath.empty() && sStreamPath[0] != '/' )
|
||||
|
||||
Reference in New Issue
Block a user