#include <SDL/SDL_image.h>
#include "Dispatcher.hh"
+#include "Exception.hh"
#include "Library.hh"
#include "Log.hh"
#include "OpenGL.hh"
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);
if (!temp)
{
- throw Exception(Exception::OPENGL_ERROR);
+ throw Exception(ErrorCode::UNKNOWN_IMAGE_FORMAT);
}
if (temp->format->BytesPerPixel == 3)
else
{
SDL_FreeSurface(temp);
- throw Exception(Exception::BAD_IMAGE_FORMAT);
+ throw Exception(ErrorCode::UNKNOWN_IMAGE_FORMAT);
}
mWidth = temp->w;