Skip to content

Add a way to capture error messages. #82

Description

@SpaceManiac

For languages with error handling facilities, it would be useful to be able to capture messages output to sf::err() from CSFML. I suggest an API like:

sfErrorCapture* sfErrorCapture_start();
const char* sfErrorCapture_get(const sfErrorCapture* capture);
void sfErrorCapture_end(sfErrorCapture* capture);

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions