SDL_SetError

Name

SDL_SetError -- sets the SDL error to a formatted string.

Synopsis

#include "SDL_error.h"

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

Description

SDL_SetError sets the SDL error to a printf style formatted string.

Return Value

This is a void function and returns nothing.

Example

   1 #include "SDL_error.h"
   2 
   3 int main()      {
   4         char buffer[BUFSIZ+1];
   5         SDL_memset(buffer, '1', BUFSIZ);
   6         buffer[BUFSIZ] = 0;
   7         SDL_SetError("This is the error: %s (%f)", buffer, 1.0);
   8         printf("Error 1: %s\n", SDL_GetError());
   9 }

See Also

SDL_GetError, SDL_ClearError


CategorySDL13API CategorySDL13APIGeneral

SDL-1.3/SDL_SetError (last edited 2009-07-27 02:31:25 by KenBull)