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
@@ -578,7 +578,7 @@ bool LuaHelpers::RunExpressionB( const RString &str )
/* Don't accept a function as a return value. */
if( lua_isfunction( L, -1 ) )
RageException::Throw( "result is a function; did you forget \"()\"?" );
RageException::Throw( "Result is a function; did you forget \"()\"?" );
bool result = !!lua_toboolean( L, -1 );
lua_pop( L, 1 );
@@ -598,7 +598,7 @@ float LuaHelpers::RunExpressionF( const RString &str )
/* Don't accept a function as a return value. */
if( lua_isfunction( L, -1 ) )
RageException::Throw( "result is a function; did you forget \"()\"?" );
RageException::Throw( "Result is a function; did you forget \"()\"?" );
float result = (float) lua_tonumber( L, -1 );
lua_pop( L, 1 );
@@ -623,7 +623,7 @@ bool LuaHelpers::RunExpressionS( const RString &str, RString &sOut )
/* Don't accept a function as a return value. */
if( lua_isfunction( L, -1 ) )
RageException::Throw( "result is a function; did you forget \"()\"?" );
RageException::Throw( "Result is a function; did you forget \"()\"?" );
sOut = lua_tostring( L, -1 );
lua_pop( L, 1 );