|
miniDSP
A small C library for audio DSP
|
Configurable error handler for precondition violations. More...
#include "minidsp.h"Go to the source code of this file.
Functions | |
| static void | default_error_handler (MD_ErrorCode code, const char *func_name, const char *message) |
| void | MD_set_error_handler (MD_ErrorHandler handler) |
| Install a custom error handler. | |
| void | md_report_error (MD_ErrorCode code, const char *func_name, const char *message) |
| Report a precondition violation to the active error handler. | |
Variables | |
| static MD_ErrorHandler | current_handler = default_error_handler |
Configurable error handler for precondition violations.
Definition in file minidsp_error.c.
|
static |
Definition at line 13 of file minidsp_error.c.
| void md_report_error | ( | MD_ErrorCode | code, |
| const char * | func_name, | ||
| const char * | message ) |
Report a precondition violation to the active error handler.
Definition at line 36 of file minidsp_error.c.
| void MD_set_error_handler | ( | MD_ErrorHandler | handler | ) |
Install a custom error handler.
When a miniDSP function detects a precondition violation (NULL pointer, invalid size, etc.) it calls the active handler instead of aborting. The default handler prints a message to stderr.
Pass NULL to restore the default handler.
Definition at line 27 of file minidsp_error.c.
|
static |
Definition at line 25 of file minidsp_error.c.