|
SDL
2.0
|
Include dependency graph for SDL_error.c:Go to the source code of this file.
Macros | |
| #define | SDL_ERRBUFIZE 1024 |
Functions | |
| int | SDL_SetError (SDL_PRINTF_FORMAT_STRING const char *fmt,...) |
| Set the error message for the current thread. More... | |
| const char * | SDL_GetError (void) |
| Get the last error message that was set. More... | |
| void | SDL_ClearError (void) |
| Clear the error message for the current thread. More... | |
| int | SDL_Error (SDL_errorcode code) |
| char * | SDL_GetErrorMsg (char *errstr, int maxlen) |
| Get the last error message that was set for the current thread. More... | |
| #define SDL_ERRBUFIZE 1024 |
Definition at line 28 of file SDL_error.c.
Clear the error message for the current thread.
Definition at line 62 of file SDL_error.c.
References SDL_error::error, and SDL_GetErrBuf().
| int SDL_Error | ( | SDL_errorcode | code | ) |
Definition at line 69 of file SDL_error.c.
References SDL_EFREAD, SDL_EFSEEK, SDL_EFWRITE, SDL_ENOMEM, SDL_SetError(), and SDL_UNSUPPORTED.
| const char* 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.
Definition at line 55 of file SDL_error.c.
References SDL_error::error, SDL_GetErrBuf(), and SDL_error::str.
| char* 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 |
Definition at line 106 of file SDL_error.c.
References SDL_error::error, SDL_GetErrBuf(), SDL_strlcpy, and SDL_error::str.
| int SDL_SetError | ( | SDL_PRINTF_FORMAT_STRING const char * | fmt, |
| ... | |||
| ) |
Set the error message for the current thread.
Definition at line 31 of file SDL_error.c.
References ERR_MAX_STRLEN, SDL_error::error, NULL, SDL_GetErrBuf(), SDL_LOG_CATEGORY_ERROR, SDL_LOG_PRIORITY_DEBUG, SDL_LogDebug, SDL_LogGetPriority, SDL_vsnprintf, and SDL_error::str.
Referenced by SDL_Error().