SoundEmitter: Show filename that caused the SDL_Sound error

This commit is contained in:
Jonas Kulla 2014-08-22 23:50:08 +02:00
parent ee8a3ca402
commit c5c58fa9cd
1 changed files with 2 additions and 1 deletions

View File

@ -188,7 +188,8 @@ SoundBuffer *SoundEmitter::allocateBuffer(const std::string &filename)
if (!sampleHandle)
{
SDL_RWclose(&dataSource);
throw Exception(Exception::SDLError, "SDL_sound: %s", Sound_GetError());
throw Exception(Exception::SDLError, "%s.%s: %s",
filename.c_str(), extension, Sound_GetError());
}
uint32_t decBytes = Sound_DecodeAll(sampleHandle);