cleanup error message

This commit is contained in:
Glenn Maynard
2008-08-11 18:52:31 +00:00
parent 1e5b8dbd76
commit 2e59d76224
@@ -25,7 +25,12 @@ static bool ExecuteCommand( const RString &sCommand )
int ret = system(sCommand);
LOG->Trace( "done executing '%s'", sCommand.c_str() );
if( ret != 0 )
LOG->Warn( "failed to execute '%s' with error %d.", sCommand.c_str(), ret );
{
RString sError = ssprintf("failed to execute '%s' with error %d", sCommand.c_str(), ret);
if( ret == -1 )
sError += ssprintf(": %s", sCommand.c_str());
LOG->Warn( "%s", sError.c_str() );
}
return ret == 0;
}