My Project
programmer's documentation
|
#include "cs_defs.h"
#include <assert.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "bft_printf.h"
#include "bft_error.h"
Functions | |
void | bft_error (const char *const file_name, const int line_num, const int sys_error_code, const char *const format,...) |
Calls the error handler (set by bft_error_handler_set() or default). More... | |
bft_error_handler_t * | bft_error_handler_get (void) |
Returns the error handler associated with the bft_error() function. More... | |
void | bft_error_handler_set (bft_error_handler_t *const handler) |
Associates an error handler with the bft_error() function. More... | |
void bft_error | ( | const char *const | file_name, |
const int | line_num, | ||
const int | sys_error_code, | ||
const char *const | format, | ||
... | |||
) |
Calls the error handler (set by bft_error_handler_set() or default).
With the default error handler, bft_print_flush() is called, an error message is output to stderr, and the current process exits with an EXIT_FAILURE code.
[in] | file_name | name of source file from which error handler called. |
[in] | line_num | line of source file from which error handler called. |
[in] | sys_error_code | error code if error in system or libc call, 0 otherwise. |
[in] | format | format string, as printf() and family. |
[in] | ... | variable arguments based on format string. |
bft_error_handler_t* bft_error_handler_get | ( | void | ) |
Returns the error handler associated with the bft_error() function.
void bft_error_handler_set | ( | bft_error_handler_t *const | handler | ) |
Associates an error handler with the bft_error() function.
[in] | handler | pointer to the error handler function. |