Wiki Page Content

Revision 12 as of 2010-08-29 19:20:19

Clear message

SDL_SetError

Use this function to set the SDL error string.

Syntax

void SDL_SetError(const char* fmt, 
                  ...)

Function Parameters

fmt

a printf() style message format string

...

additional parameters matching % tokens in the fmt string, if any

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.


CategoryAPI, CategoryError

(Page Info.)
Feedback
Please include your contact information if you'd like to receive a reply.
Submit