My Project
|
Go to the source code of this file.
Functions | |
DECLSPEC int SDLCALL | SDL_SetError (SDL_PRINTF_FORMAT_STRING const char *fmt,...) SDL_PRINTF_VARARG_FUNC(1) |
Set the error message for the current thread. More... | |
DECLSPEC const char *SDLCALL | SDL_GetError (void) |
Get the last error message that was set. More... | |
DECLSPEC char *SDLCALL | SDL_GetErrorMsg (char *errstr, int maxlen) |
Get the last error message that was set for the current thread. More... | |
DECLSPEC void SDLCALL | SDL_ClearError (void) |
Clear the error message for the current thread. | |
Internal error functions | |
#define | SDL_OutOfMemory() SDL_Error(SDL_ENOMEM) |
#define | SDL_Unsupported() SDL_Error(SDL_UNSUPPORTED) |
#define | SDL_InvalidParamError(param) SDL_SetError("Parameter '%s' is invalid", (param)) |
enum | SDL_errorcode { SDL_ENOMEM, SDL_EFREAD, SDL_EFWRITE, SDL_EFSEEK, SDL_UNSUPPORTED, SDL_LASTERROR } |
DECLSPEC int SDLCALL | SDL_Error (SDL_errorcode code) |
Simple error message routines for SDL.
DECLSPEC const char* SDLCALL SDL_GetError | ( | void | ) |
Get the last error message that was set.
SDL API functions may set error messages and then succeed, so you should only use the error value if a function fails.
This returns a pointer to a static buffer for convenience and should not be called by multiple threads simultaneously.
DECLSPEC char* SDLCALL SDL_GetErrorMsg | ( | char * | errstr, |
int | maxlen | ||
) |
Get the last error message that was set for the current thread.
SDL API functions may set error messages and then succeed, so you should only use the error value if a function fails.
errstr | A buffer to fill with the last error message that was set for the current thread |
maxlen | The size of the buffer pointed to by the errstr parameter |
DECLSPEC int SDLCALL SDL_SetError | ( | SDL_PRINTF_FORMAT_STRING const char * | fmt, |
... | |||
) |
Set the error message for the current thread.