SDL_GetErrorMsg

Name

SDL_GetErrorMsg -- Gets SDL error string into the specified buffer.

Synopsis

#include "SDL.h"
extern DECLSPEC char * SDLCALL SDL_GetErrorMsg(char *, unsigned int);

char *SDL_GetErrorMsg(char *errstr, unsigned int maxlen);

Description

SDL_GetErrorMsg stores up to maxlen bytes of the SDL error string into the buffer errstr.

Return Value

Returns errstr.

Example

char* buffer = SDL_GetErrorMsg((char*) malloc(16), 15);

printf("+----------------------+\n");
printf("| ERROR:               |\n");
printf("| %-15s |\n", buffer);
printf("+----------------------+\n");

See Also

SDL_GetError, SDL_SetError, SDL_Error, SDL_ClearError

SDL_GetErrorMsg (last edited 2008-04-17 08:18:18 by localhost)