SFML community forums

Help => General => Topic started by: Ant on September 10, 2014, 07:08:23 am

Title: Error Handling
Post by: Ant on September 10, 2014, 07:08:23 am
I was curious about the error handling system for SFML.  For example, SFML may be unable to import an image if an artist specifies incorrect parameters.  When that happens, I would like to display a meaningful message to them.  I did read an old post about this topic...
http://en.sfml-dev.org/forums/index.php?topic=4643.0

I am curious if there are any news about error handling since that post.  If not, are there any plans for displaying error messages?

Thanks for the support!

-Ant
Title: Re: Error Handling
Post by: Strelok on September 10, 2014, 07:27:18 am
If I recall correctly SFML 3 may use exceptions.
Title: AW: Error Handling
Post by: eXpl0it3r on September 13, 2014, 05:28:18 pm
For SFML 2.x there won't be a change in error handling, that is you get a bool for success/failure and a hardcoded message via sf::err(), which if not redirected will print an error to std::cerr.

For SFML 3 we'll most likely be using exceptions, but there's nothing written about how etc. ;)
Title: Re: Error Handling
Post by: Ant on September 15, 2014, 06:32:48 am
Thank you for the information.

I'll settle for the redirect solution for the time being.  I'll apply the exception solution when it's ready.  I'm looking forward to SFML 3!