add error check

This commit is contained in:
Glenn Maynard
2003-01-06 10:52:53 +00:00
parent e5cd3a0800
commit 2c95666ee2
+3 -1
View File
@@ -187,7 +187,9 @@ bool RageSound::Load(CString sSoundFilePath, bool cache)
sound_desired.rate = samplerate;
SoundReader *NewSample = new SoundReader_SDL_Sound;
NewSample->Open(sSoundFilePath.GetString());
if(!NewSample->Open(sSoundFilePath.GetString()))
RageException::Throw( "RageSoundManager::RageSoundManager: error opening sound %s: %s",
sSoundFilePath.GetString(), NewSample->GetError());
/* Try to decode into full_buf. */
big = false;