From 5b45911856442ee7cbd451125c47fd13f21db58e Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Mon, 13 Aug 2012 23:09:30 +0200 Subject: Improved error messages Added some logging and improved error messages displayed to user --- src/graphics/engine/engine.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/graphics/engine/engine.cpp') diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp index 5988949..3187dde 100644 --- a/src/graphics/engine/engine.cpp +++ b/src/graphics/engine/engine.cpp @@ -2113,8 +2113,7 @@ Gfx::Texture Gfx::CEngine::CreateTexture(const std::string& texName, const Gfx:: if (! img.Load(m_app->GetDataFilePath(m_texPath, texName))) { std::string error = img.GetError(); - GetLogger()->Error("Couldn't load texture '%s': %s\n", texName.c_str(), error.c_str()); - GetLogger()->Error("Blacklisting texture '%s'\n", texName.c_str()); + GetLogger()->Error("Couldn't load texture '%s': %s, blacklisting\n", texName.c_str(), error.c_str()); m_texBlacklist.insert(texName); return Gfx::Texture(); // invalid texture } @@ -2123,9 +2122,7 @@ Gfx::Texture Gfx::CEngine::CreateTexture(const std::string& texName, const Gfx:: if (! tex.Valid()) { - std::string error = m_device->GetError(); - GetLogger()->Error("Couldn't load texture '%s': %s\n", texName.c_str(), error.c_str()); - GetLogger()->Error("Blacklisting texture '%s'\n", texName.c_str()); + GetLogger()->Error("Couldn't load texture '%s', blacklisting\n", texName.c_str()); m_texBlacklist.insert(texName); return tex; } -- cgit v1.2.3-1-g7c22