|
8
|
1 |
#ifndef LIB_ERROR_H
|
|
|
2 |
#define LIB_ERROR_H
|
|
|
3 |
|
|
11
|
4 |
#include "log.h"
|
|
|
5 |
|
|
8
|
6 |
#define ERROR(...) do { err_func(__func__, __VA_ARGS__); goto error; } while (0)
|
|
|
7 |
#define PERROR(...) do { perr_func(__func__, __VA_ARGS__); goto error; } while (0)
|
|
|
8 |
#define EERROR(_err, ...) do { eerr_func(__func__, (_err), __VA_ARGS__); goto error; } while (0)
|
|
24
|
9 |
#define NERROR(...) do { err_func_nonl(__func__, __VA_ARGS__); goto error; } while (0)
|
|
8
|
10 |
|
|
11
|
11 |
#define FATAL(...) err_func_exit(__func__, __VA_ARGS__)
|
|
|
12 |
#define PFATAL(...) perr_func_exit(__func__, __VA_ARGS__)
|
|
|
13 |
|
|
8
|
14 |
#endif /* LIB_ERROR_H */
|