I have a weird problem using the createTexture() method.
Code: Select all
try
{
CEGUI::Texture* texture = mGUIRenderer->createTexture(imagePath);
imageSet = CEGUI::ImagesetManager::getSingleton().createImageset(imageID, texture);
imageSet->defineImage(imageID,CEGUI::Point(0.0f, 0.0f),CEGUI::Size(texture->getWidth(), texture->getHeight()),CEGUI::Point(0.0f,0.0f));
}
catch (...)
{
CEGUI::Texture* texture = mGUIRenderer->createTexture(imagePath);
imageSet = CEGUI::ImagesetManager::getSingleton().createImageset(imageID, texture);
imageSet->defineImage(imageID,CEGUI::Point(0.0f, 0.0f),CEGUI::Size(texture->getWidth(), texture->getHeight()),CEGUI::Point(0.0f,0.0f));
}
this is just a reproduction of a problem I'm having, this is not the code I'm programming

As you can see, I'm using the exact code in the try and catch, so basically, the same code is executed two times. First, it throws an exception an the createTexture function, then at the catch part, the same code is again executed. The problem is that this time, the createTexture function does not throw the exception. I need it to throw it everytime...
thanks