SDL_SetErrorV(3)

πŸ’– SDL_SetErrorV(3) πŸ’–

okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, where we set error messages and we do it with vibes. This one's called SDL_SetErrorV, and yes, it's giving very much "the va_list sibling of SDL_SetError" energy. πŸŽ€


✨ NAME ✨

SDL_SetErrorV β€” set the SDL error message for the current thread. 🫢


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_error.h>

bool SDL_SetErrorV(const char *fmt, va_list ap);

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea: calling this function will replace any previous error message that was set. Not append, not stack, not keep receipts β€” replace. The old one is gone, the new one is the main character now. πŸ’…


πŸ‘‘ FUNCTION PARAMETERS πŸ‘‘

  • fmt β€” a printf()-style message format string. Yes, the classic format-string situation, but for errors. πŸ“
  • ap β€” a variable argument list. That's the va_list bestie, the little bundle of args that fmt is gonna munch on. ✨

⭐ RETURN VALUE ⭐

Returns false.

That's it. That's the whole return value. It literally always says false. No notes, no cap. πŸ’€


🌈 THREAD SAFETY 🌈

It is safe to call this function from any thread. Go off, multithreaded icon. 🧚


πŸ’œ AVAILABILITY πŸ’œ

This function is available since SDL 3.2.0. So if you're on something older, sorry bestie, it's not there yet. πŸ™ˆ


πŸ”₯ SEE ALSO πŸ”₯


and that's the whole page, periodt. πŸ’– brought to you by Simple Directmedia Layer in SDL 3.4.18, and this page goes by SDL_SetErrorV(3). mwah, go set some errors responsibly πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from