Why not create a sf::Exception to make SFML-usage much more flexible and easier to debug?
Take sf::Image for example, if you try to load an image that doesn't exist to it using sf::Image::LoadFromFile();, all it does is print "Error: File blablabla". It should throw an exception instead, so you can handle your errors appropriate to your actual project.
Like if you have a custom error-log-management, you could do this:
try{
sf::Image Bleh;
Bleh.LoadFromFile("./data/bleh.jph");
sf::Image Bleh2;
Bleh.LoadFromFile("./data/bleh2.jph");
}catch(sf::Exception &e){
myErrorManager << e;
}
instead of:
sf::Image Bleh;
if(!Bleh.LoadFromFile("./data/bleh.jph")){
MyErrorManager << "Couldn't load bleh from bleh.jph, this error is hardcoded and not very flexible.";
}
sf::Image Bleh2;
if(!Bleh2.LoadFromFile("./data/bleh2.jph")){
MyErrorManager << "Couldn't load bleh2 from other file bleh2.jph, this error is hardcoded and not very flexible.";
}
I was gonna post this as an issue/feature/request on the bugtracker, but didn't know how to approach that since i never used something like that before