SFML community forums

Help => System => Topic started by: Hindi on March 18, 2013, 10:26:51 pm

Title: [SFML 2.0] Disabling error message
Post by: Hindi on March 18, 2013, 10:26:51 pm
Hi !

I'm spamming the loadFromFile method on several directories. I'd like to keep my shell clean and set my own error messages instead of the dozens SFML's messages.
I learnt that I can't disable the messages and that they are sent to a specific ostream owned by SFML. Can I do something on that ostream to avoid the messages to be printed ?

Thanks for your help.
Title: Re: [SFML 2.0] Disabling error message
Post by: Foaly on March 18, 2013, 10:45:59 pm
A quick look in the documentation (http://"http://www.sfml-dev.org/documentation/2.0/group__system.php#ga7fe7f475639e26334606b5142c29551f") would have shown you that this:
 // Redirect to nothing
 sf::err().rdbuf(NULL);
"disables" SFMLs error messages, by redirecting the stream to nothing.
Title: Re: [SFML 2.0] Disabling error message
Post by: Hindi on March 19, 2013, 01:22:56 am
A quick look at the documentation and the thread on the forum gave me the informations I wrote on the first post.

Anyway, thank you for your anwer, it helps a lot.