

DOCUMENTATION for ec_error.c

HOW TO USE ERROR MESSAGES INSIDE ETTERCAP

===============================================================================

the file ec_error.h exports two functions:

void Error_msg(char *message, ...);

   to report an error message and exit the application.
   

void Error_critical_msg(char *file, char *function, int line, char *message);

   to report a detailed error messages containing source file, funcion and line
   information.



the ERROR_MSG() macro is a wrapper for Error_critical_msg as define below:


#define ERROR_MSG(x) Error_critical_msg(__FILE__, __FUNCTION__, __LINE__, x)


you can use this macro for critical error like malloc returning NULL or ioclt
failures.



EOF
