0

There are multiple references in the nim SDL2 mixer.nim file to Error messages can be retrieved from Mix_GetError().

However, I can't seem to find this function defined in the mixer.nim file

How can I get the latest error string?

lilroo
  • 2,928
  • 7
  • 25
  • 34

1 Answers1

0

You can call sdl2.getError() (from from the base sdl2 bindings) to get the latest error string.

lilroo
  • 2,928
  • 7
  • 25
  • 34
  • 1
    that's not a problem with the documentation in sdl2 mixer bindings. Those comments were directly copied from the original SDL_mixer documentation, and it clearly says to use Mix_GetError. It just so happens that `Mix_GetError` is actually an alias for SDL's own GetError so it works, but it would still be better to call Mix_GetError specifically for errors with SDL_mixer. See https://github.com/libsdl-org/SDL_mixer/blob/main/include/SDL_mixer.h#L701 – Optimon May 10 '22 at 13:49