Wiki Page Content

Differences between revisions 1 and 10 (spanning 9 versions)
Revision 1 as of 2010-05-08 20:39:27
Size: 652
Editor: SheenaSmith
Comment: create page, add content (Wed Mar 10 ver; changeset 4428)
Revision 10 as of 2010-08-29 19:14:15
Size: 783
Editor: Sam Lantinga
Comment: null
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
||<tablewidth="100%" style="color: #FF0000;" :> DRAFT||
Line 6: Line 5:
Use this function to ^create the content of an error message^. Use this function to set the SDL error string.
Line 17: Line 16:
||'''fmt'''||a pointer to information about the format of the error ???||
||''''''||||
||'''fmt'''||a printf() style message format string||
||'''...'''||additional parameters matching % tokens in the '''fmt''' string, if any||
Line 22: Line 21:
You can add your code example here SDL_SetError("Something unexpected happened!");
}}}

{{{#!highlight cpp
SDL_SetError("Something unexpected happened: Error Code %d", -37);
Line 29: Line 32:
 .[[SDL_ClearError]]
 .[[SDL_GetError]]

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!");

SDL_SetError("Something unexpected happened: Error Code %d", -37);

Remarks

You can add useful comments here


CategoryAPI, CategoryError

None: SDL_SetError (last edited 2016-05-11 20:22:50 by PhilippWiesemann)

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