s/throw RageException/RageException::Throw/
hush that loud warning
This commit is contained in:
@@ -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 )
|
||||
{
|
||||
|
||||
@@ -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 )
|
||||
{
|
||||
|
||||
@@ -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() );
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user