From c5c58fa9cda508bce99097939b6752745ea2f5a4 Mon Sep 17 00:00:00 2001 From: Jonas Kulla Date: Fri, 22 Aug 2014 23:50:08 +0200 Subject: [PATCH] SoundEmitter: Show filename that caused the SDL_Sound error --- src/soundemitter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/soundemitter.cpp b/src/soundemitter.cpp index b17d2c0..63be515 100644 --- a/src/soundemitter.cpp +++ b/src/soundemitter.cpp @@ -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);