SFML community forums

Help => General => Topic started by: Wibbs on October 27, 2009, 11:23:23 am

Title: How does SFML handle errors?
Post by: Wibbs on October 27, 2009, 11:23:23 am
Hi all,

Just a quick question....I've been reading through the docs and tutorials, but so far I haven't seen any mention of how SFML handles errors.  For example, what would happen if SFML couldn't detect a mouse or keyboard, or the video card on the machine wasn't compatible?

Thanks,

Wibbs
Title: How does SFML handle errors?
Post by: Laurent on October 27, 2009, 11:43:44 am
What you're talking about are not errors: if there's no keyboard or mouse then you will simply not receive the corresponding events, and the graphics card cannot be "not compatible" (it will always work unless you don't have an OpenGL implementation installed -- in this case you'll probably have a "shared library missing" message from the OS).
Title: How does SFML handle errors?
Post by: Wibbs on October 27, 2009, 12:07:08 pm
So there are no exceptions or error code type issues to worry about and handle that are specific to SFML?
Title: How does SFML handle errors?
Post by: Laurent on October 27, 2009, 12:12:27 pm
The SFML functions that may fail return a boolean, and write a message on the standard error output if any error occured. That's all.
Title: How does SFML handle errors?
Post by: Wibbs on October 27, 2009, 10:46:18 pm
Cool thanks - makes it nice and straightforward to use :)