diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2012-08-13 23:09:30 +0200 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2012-08-13 23:09:30 +0200 |
commit | 5b45911856442ee7cbd451125c47fd13f21db58e (patch) | |
tree | d843bc18e4b777628faec617510d663e5cfaa01a /src/graphics/engine | |
parent | a2dd39960b5851f8e62adf59b11b36ba14626468 (diff) | |
download | colobot-5b45911856442ee7cbd451125c47fd13f21db58e.tar.gz colobot-5b45911856442ee7cbd451125c47fd13f21db58e.tar.bz2 colobot-5b45911856442ee7cbd451125c47fd13f21db58e.zip |
Improved error messages
Added some logging and improved error messages displayed to user
Diffstat (limited to 'src/graphics/engine')
-rw-r--r-- | src/graphics/engine/engine.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
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; } |