]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Texture.cc
big batch of changes
[chaz/yoink] / src / Moof / Texture.cc
index 78dc0c8148b478c092f0375ac46c3ecff2d7f707..341b5598f13f9b8c7d42f93643f26ca3f4727568 100644 (file)
@@ -34,6 +34,7 @@
 #include <SDL/SDL_image.h>
 
 #include "Dispatcher.hh"
+#include "Exception.hh"
 #include "Library.hh"
 #include "Log.hh"
 #include "OpenGL.hh"
@@ -245,7 +246,7 @@ public:
                if (!surface)
                {
                        logWarning("texture not found: %s", getName().c_str());
-                       throw Exception(Exception::FILE_NOT_FOUND);
+                       throw Exception(ErrorCode::FILE_NOT_FOUND, getName().c_str());
                }
 
                SDL_Surface* temp = prepareImageForGL(surface);
@@ -253,7 +254,7 @@ public:
 
                if (!temp)
                {
-                       throw Exception(Exception::OPENGL_ERROR);
+                       throw Exception(ErrorCode::UNKNOWN_IMAGE_FORMAT);
                }
 
                if (temp->format->BytesPerPixel == 3)
@@ -267,7 +268,7 @@ public:
                else
                {
                        SDL_FreeSurface(temp);
-                       throw Exception(Exception::BAD_IMAGE_FORMAT);
+                       throw Exception(ErrorCode::UNKNOWN_IMAGE_FORMAT);
                }
 
                mWidth = temp->w;
This page took 0.019688 seconds and 4 git commands to generate.