You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to implement this myself using std::ostringstream, but it seems like something is going odd in linking and each CSFML module has its own copy of the sf::err function, so placing these functions in the system module means that errors from other modules are not redirected.
Error handling will completely change in a future version of SFML, and as you pointed, there are multiple sf::err streams in CSFML, so there's no easy solution.
It would be possible to add a function to each module to redirect the output into a single stream. Trouble with that approach is that if SFML is dynamically linked then sf::err will be set multiple times and it would be redundant. But that could be avoided with a few simple processor commands at compile time.
Activity
oprypin commentedon Aug 23, 2015
I support this.
LaurentGomila commentedon Aug 23, 2015
Error handling will completely change in a future version of SFML, and as you pointed, there are multiple sf::err streams in CSFML, so there's no easy solution.
zsbzsb commentedon Nov 6, 2015
It would be possible to add a function to each module to redirect the output into a single stream. Trouble with that approach is that if SFML is dynamically linked then
sf::errwill be set multiple times and it would be redundant. But that could be avoided with a few simple processor commands at compile time.