From 502256e91e638beb94f116696df5c7d910dd2c0b Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 21 Dec 2002 18:38:29 +0000 Subject: [PATCH] s/throw RageException/RageException::Throw/ hush that loud warning --- stepmania/src/RageNetworkClient.cpp | 2 +- stepmania/src/RageNetworkServer.cpp | 13 +++++++------ stepmania/src/RageSound.cpp | 8 ++++---- stepmania/src/Song.cpp | 4 ++-- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/stepmania/src/RageNetworkClient.cpp b/stepmania/src/RageNetworkClient.cpp index 26f0f11142..01f8f57ca4 100644 --- a/stepmania/src/RageNetworkClient.cpp +++ b/stepmania/src/RageNetworkClient.cpp @@ -108,7 +108,7 @@ void RageNetworkClient::Update( float fDeltaTime ) int numready = SDLNet_CheckSockets(m_priSockSet, 0); if(numready==-1) { - LOG->Warn("SDLNet_CheckSockets: %s\n", SDLNet_GetError()); +// LOG->Warn("SDLNet_CheckSockets: %s\n", SDLNet_GetError()); } else if( numready ) { diff --git a/stepmania/src/RageNetworkServer.cpp b/stepmania/src/RageNetworkServer.cpp index 70f8c3e515..7e6dd8f6e2 100644 --- a/stepmania/src/RageNetworkServer.cpp +++ b/stepmania/src/RageNetworkServer.cpp @@ -64,16 +64,16 @@ RageNetworkServer::RageNetworkServer() // SDL_Init(0); // this may have already been init'd somewhere else if( SDLNet_Init() < 0 ) - throw RageException("SDLNet_Init: %s\n", SDLNet_GetError()); + RageException::Throw("SDLNet_Init: %s\n", SDLNet_GetError()); // allocate socket sets m_listenSockSet = SDLNet_AllocSocketSet(1); if(!m_listenSockSet) - throw RageException("SDLNet_AllocSocketSet: %s\n", SDLNet_GetError()); + RageException::Throw("SDLNet_AllocSocketSet: %s\n", SDLNet_GetError()); m_clientSocksSet = SDLNet_AllocSocketSet(MAX_CLIENTS); if(!m_clientSocksSet) - throw RageException("SDLNet_AllocSocketSet: %s\n", SDLNet_GetError()); + RageException::Throw("SDLNet_AllocSocketSet: %s\n", SDLNet_GetError()); } RageNetworkServer::~RageNetworkServer() @@ -114,11 +114,11 @@ void RageNetworkServer::Listen(unsigned short port) IPaddress ip; if( SDLNet_ResolveHost(&ip,NULL,port)==-1 ) - throw RageException("SDLNet_ResolveHost: %s\n", SDLNet_GetError()); + RageException::Throw("SDLNet_ResolveHost: %s\n", SDLNet_GetError()); m_listenSock=SDLNet_TCP_Open(&ip); if( !m_listenSock ) - throw RageException("SDLNet_TCP_Open: %s\n", SDLNet_GetError()); + RageException::Throw("SDLNet_TCP_Open: %s\n", SDLNet_GetError()); SDLNet_TCP_AddSocket( m_listenSockSet, m_listenSock ); } @@ -146,7 +146,8 @@ void RageNetworkServer::Update( float fDeltaTime ) int numready = SDLNet_CheckSockets(m_clientSocksSet, 0); if(numready==-1) { - LOG->Warn("SDLNet_CheckSockets: %s\n", SDLNet_GetError()); + // XXX sorry, this was really noisy ... - glenn +// LOG->Warn("SDLNet_CheckSockets: %s\n", SDLNet_GetError()); } else if( numready > 0 ) { diff --git a/stepmania/src/RageSound.cpp b/stepmania/src/RageSound.cpp index c0887d548c..135077dc22 100644 --- a/stepmania/src/RageSound.cpp +++ b/stepmania/src/RageSound.cpp @@ -71,7 +71,7 @@ RageSound::RageSound() if(!initialized) { if(!Sound_Init()) - throw RageException( "RageSoundManager::RageSoundManager: error initializing sound loader: %s", Sound_GetError()); + RageException::Throw( "RageSoundManager::RageSoundManager: error initializing sound loader: %s", Sound_GetError()); initialized = true; } @@ -159,7 +159,7 @@ void RageSound::Load(CString sSoundFilePath, bool cache) &sound_desired, read_block_size); if( NewSample == NULL ) - throw RageException( "RageSound::LoadSound: error loading %s: %s", + RageException::Throw( "RageSound::LoadSound: error loading %s: %s", sSoundFilePath.GetString(), Sound_GetError() ); /* Try to decode into full_buf. */ @@ -189,7 +189,7 @@ void RageSound::Load(CString sSoundFilePath, bool cache) int cnt = Sound_Decode(NewSample); if(cnt < 0) - throw RageException("Read error on %s: %s", + RageException::Throw("Read error on %s: %s", sSoundFilePath.GetString(), Sound_GetError() ); /* XXX (see other error-handling XXX) */ /* Add the buffer. */ @@ -281,7 +281,7 @@ int RageSound::stream_t::FillBuf(int bytes) * periodically and do something more intelligent when we * fail (so we don't play out the rest of the song in * silence) ... */ - throw RageException("Read error: %s", + RageException::Throw("Read error: %s", Sound_GetError() ); } diff --git a/stepmania/src/Song.cpp b/stepmania/src/Song.cpp index 474518eae8..5fbb38d842 100644 --- a/stepmania/src/Song.cpp +++ b/stepmania/src/Song.cpp @@ -377,7 +377,7 @@ void Song::TidyUpData() m_sMusicFile = arrayPossibleMusic[0]; // Don't throw on missing music. -Chris // else -// throw RageException( "The song in '%s' is missing a music file. You must place a music file in the song folder or remove the song", m_sSongDir.GetString() ); +// RageException::Throw( "The song in '%s' is missing a music file. You must place a music file in the song folder or remove the song", m_sSongDir.GetString() ); } /* This must be done before radar calculation. */ @@ -416,7 +416,7 @@ void Song::TidyUpData() TrimRight(m_sSubTitle); if( m_sArtist == "" ) m_sArtist = "Unknown artist"; if( m_BPMSegments.empty() ) - throw RageException( "No #BPM specified in '%s%s.'", m_sSongDir.GetString(), m_sSongFileName.GetString() ); + RageException::Throw( "No #BPM specified in '%s%s.'", m_sSongDir.GetString(), m_sSongFileName.GetString() ); // We're going to try and do something intelligent here... // The MusicSampleStart always seems to be about 100-120 beats into