|
Size: 876
Comment: removed unnecessary newline in syntax
|
Size: 915
Comment: Updated to match SDL_error.h
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 10: | Line 10: |
| void SDL_SetError(const char* fmt, ...) | int SDL_SetError(const char* fmt, ...) |
| Line 16: | Line 16: |
| == Return Value == Returns always -1. |
SDL_SetError
Use this function to set the SDL error string.
Contents
Syntax
int SDL_SetError(const char* fmt, ...)
Function Parameters
fmt |
a printf() style message format string |
... |
additional parameters matching % tokens in the fmt string, if any |
Return Value
Returns always -1.
Code Examples
SDL_SetError("Something unexpected happened!");
int errorCode = 0;
...
errorCode = -37;
...
if (errorCode < 0)
SDL_SetError("Something unexpected happened: Error Code %d", errorCode);
Remarks
Calling this function will replace any previous error message that was set.
