Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Window
»
SFML error checking and exceptions
Print
Pages: [
1
]
Author
Topic: SFML error checking and exceptions (Read 4667 times)
0 Members and 1 Guest are viewing this topic.
mercurio7891
Jr. Member
Posts: 89
SFML error checking and exceptions
«
on:
December 27, 2010, 12:11:50 pm »
Hi, do SFML throw exceptions in any of the classes? If not how should I check for failures? for example when creating the sf::Window class, how would I know if the constructor failed? or sf::Window::Create failed?
Logged
Laurent
Administrator
Hero Member
Posts: 32498
SFML error checking and exceptions
«
Reply #1 on:
December 27, 2010, 12:20:35 pm »
SFML doesn't use exceptions. Everything that may fail returns a boolean, and prints a message in standard output on failure.
Constructors and functions that don't return a boolean, such as Window::Window and Window::Create, cannot fail.
Logged
Laurent Gomila - SFML developer
Silvah
Guest
SFML error checking and exceptions
«
Reply #2 on:
December 27, 2010, 01:53:29 pm »
Quote from: "Laurent"
prints a message in standard output on failure.
Did you mean "standard error output"?
Logged
Laurent
Administrator
Hero Member
Posts: 32498
SFML error checking and exceptions
«
Reply #3 on:
December 27, 2010, 02:07:18 pm »
Yes, sorry.
Logged
Laurent Gomila - SFML developer
Print
Pages: [
1
]
SFML community forums
»
Help
»
Window
»
SFML error checking and exceptions
anything