alsa-lib/include/error.h

35 lines
802 B
C
Raw Normal View History

/**
* \defgroup Error Error handling
* Error handling
* \{
1998-08-13 15:42:56 +00:00
*/
#define SND_ERROR_BEGIN 500000
1999-07-22 10:49:39 +00:00
#define SND_ERROR_INCOMPATIBLE_VERSION (SND_ERROR_BEGIN+0)
1998-08-13 15:42:56 +00:00
#ifdef __cplusplus
extern "C" {
#endif
const char *snd_strerror(int errnum);
1998-08-13 15:42:56 +00:00
2001-03-29 09:44:29 +00:00
/**
* \brief Error handler
* \param file File name
* \param line Line number
* \param function Function name
* \param err errno value (or 0 if not relevant)
* \param fmt printf(3) format
* \param ... printf(3) arguments
*/
typedef void (snd_lib_error_handler_t)(const char *file, int line, const char *function, int err, const char *fmt, ...) /* __attribute__ ((format (printf, 5, 6))) */;
2000-11-25 16:36:18 +00:00
extern snd_lib_error_handler_t *snd_lib_error;
extern int snd_lib_error_set_handler(snd_lib_error_handler_t *handler);
1998-08-13 15:42:56 +00:00
#ifdef __cplusplus
}
#endif
/** \} */