SR Research Support Site
Functions
Accessing and reporting error messages

Functions

void alert_printf (char *fmt,...)
 
char * eyelink_get_error (int id, char *function_name)
 

Detailed Description

Function Documentation

void alert_printf ( char *  fmt,
  ... 
)

When an error occurs, a notification must be given to the user. If no alert_printf_hook is set, this function uses the Windows MessageBox() function in windows. On other platforms printf is called.

Parameters
fmtA printf() formatting string<...>: any arguments required.
Remarks
The error message may no showup in certain display environment eg. SDL with SDL_FULLSCREEN|SDL_HWSURFACE | SDL_DOUBLEBUF
char* eyelink_get_error ( int  id,
char *  function_name 
)

Returns error description for given function with error id.

Example:

1 int rv = open_eyelink_connection(0);
2 if(rv)
3 {
4  char *errmsg = eyelink_get_error(rv,"open_eyelink_connection");
5  printf("Error: %s \n", errmsg); // report the error
6  return -1;
7 }
Parameters
[in]idError id
[in]function_nameName of the function that generated the error id.

Copyright ©2002-2021, SR Research Ltd.