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);
|
int numready = SDLNet_CheckSockets(m_priSockSet, 0);
|
||||||
if(numready==-1)
|
if(numready==-1)
|
||||||
{
|
{
|
||||||
LOG->Warn("SDLNet_CheckSockets: %s\n", SDLNet_GetError());
|
// LOG->Warn("SDLNet_CheckSockets: %s\n", SDLNet_GetError());
|
||||||
}
|
}
|
||||||
else if( numready )
|
else if( numready )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -64,16 +64,16 @@ RageNetworkServer::RageNetworkServer()
|
|||||||
// SDL_Init(0); // this may have already been init'd somewhere else
|
// SDL_Init(0); // this may have already been init'd somewhere else
|
||||||
|
|
||||||
if( SDLNet_Init() < 0 )
|
if( SDLNet_Init() < 0 )
|
||||||
throw RageException("SDLNet_Init: %s\n", SDLNet_GetError());
|
RageException::Throw("SDLNet_Init: %s\n", SDLNet_GetError());
|
||||||
|
|
||||||
// allocate socket sets
|
// allocate socket sets
|
||||||
m_listenSockSet = SDLNet_AllocSocketSet(1);
|
m_listenSockSet = SDLNet_AllocSocketSet(1);
|
||||||
if(!m_listenSockSet)
|
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);
|
m_clientSocksSet = SDLNet_AllocSocketSet(MAX_CLIENTS);
|
||||||
if(!m_clientSocksSet)
|
if(!m_clientSocksSet)
|
||||||
throw RageException("SDLNet_AllocSocketSet: %s\n", SDLNet_GetError());
|
RageException::Throw("SDLNet_AllocSocketSet: %s\n", SDLNet_GetError());
|
||||||
}
|
}
|
||||||
|
|
||||||
RageNetworkServer::~RageNetworkServer()
|
RageNetworkServer::~RageNetworkServer()
|
||||||
@@ -114,11 +114,11 @@ void RageNetworkServer::Listen(unsigned short port)
|
|||||||
|
|
||||||
IPaddress ip;
|
IPaddress ip;
|
||||||
if( SDLNet_ResolveHost(&ip,NULL,port)==-1 )
|
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);
|
m_listenSock=SDLNet_TCP_Open(&ip);
|
||||||
if( !m_listenSock )
|
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 );
|
SDLNet_TCP_AddSocket( m_listenSockSet, m_listenSock );
|
||||||
}
|
}
|
||||||
@@ -146,7 +146,8 @@ void RageNetworkServer::Update( float fDeltaTime )
|
|||||||
int numready = SDLNet_CheckSockets(m_clientSocksSet, 0);
|
int numready = SDLNet_CheckSockets(m_clientSocksSet, 0);
|
||||||
if(numready==-1)
|
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 )
|
else if( numready > 0 )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ RageSound::RageSound()
|
|||||||
if(!initialized)
|
if(!initialized)
|
||||||
{
|
{
|
||||||
if(!Sound_Init())
|
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;
|
initialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -159,7 +159,7 @@ void RageSound::Load(CString sSoundFilePath, bool cache)
|
|||||||
&sound_desired, read_block_size);
|
&sound_desired, read_block_size);
|
||||||
|
|
||||||
if( NewSample == NULL )
|
if( NewSample == NULL )
|
||||||
throw RageException( "RageSound::LoadSound: error loading %s: %s",
|
RageException::Throw( "RageSound::LoadSound: error loading %s: %s",
|
||||||
sSoundFilePath.GetString(), Sound_GetError() );
|
sSoundFilePath.GetString(), Sound_GetError() );
|
||||||
|
|
||||||
/* Try to decode into full_buf. */
|
/* Try to decode into full_buf. */
|
||||||
@@ -189,7 +189,7 @@ void RageSound::Load(CString sSoundFilePath, bool cache)
|
|||||||
int cnt = Sound_Decode(NewSample);
|
int cnt = Sound_Decode(NewSample);
|
||||||
|
|
||||||
if(cnt < 0)
|
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) */
|
sSoundFilePath.GetString(), Sound_GetError() ); /* XXX (see other error-handling XXX) */
|
||||||
|
|
||||||
/* Add the buffer. */
|
/* Add the buffer. */
|
||||||
@@ -281,7 +281,7 @@ int RageSound::stream_t::FillBuf(int bytes)
|
|||||||
* periodically and do something more intelligent when we
|
* periodically and do something more intelligent when we
|
||||||
* fail (so we don't play out the rest of the song in
|
* fail (so we don't play out the rest of the song in
|
||||||
* silence) ... */
|
* silence) ... */
|
||||||
throw RageException("Read error: %s",
|
RageException::Throw("Read error: %s",
|
||||||
Sound_GetError() );
|
Sound_GetError() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -377,7 +377,7 @@ void Song::TidyUpData()
|
|||||||
m_sMusicFile = arrayPossibleMusic[0];
|
m_sMusicFile = arrayPossibleMusic[0];
|
||||||
// Don't throw on missing music. -Chris
|
// Don't throw on missing music. -Chris
|
||||||
// else
|
// 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. */
|
/* This must be done before radar calculation. */
|
||||||
@@ -416,7 +416,7 @@ void Song::TidyUpData()
|
|||||||
TrimRight(m_sSubTitle);
|
TrimRight(m_sSubTitle);
|
||||||
if( m_sArtist == "" ) m_sArtist = "Unknown artist";
|
if( m_sArtist == "" ) m_sArtist = "Unknown artist";
|
||||||
if( m_BPMSegments.empty() )
|
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...
|
// We're going to try and do something intelligent here...
|
||||||
// The MusicSampleStart always seems to be about 100-120 beats into
|
// The MusicSampleStart always seems to be about 100-120 beats into
|
||||||
|
|||||||
Reference in New Issue
Block a user