equal
deleted
inserted
replaced
1 #ifndef LIB_ERROR_H |
1 #ifndef LIB_ERROR_H |
2 #define LIB_ERROR_H |
2 #define LIB_ERROR_H |
3 |
3 |
4 #include "log.h" |
4 #include "log.h" |
5 |
5 #include "err.h" |
6 /* |
|
7 * err_t is always positive |
|
8 */ |
|
9 typedef unsigned int err_t; |
|
10 |
6 |
11 #define ERROR(...) do { err_func(__func__, __VA_ARGS__); goto error; } while (0) |
7 #define ERROR(...) do { err_func(__func__, __VA_ARGS__); goto error; } while (0) |
12 #define PERROR(...) do { perr_func(__func__, __VA_ARGS__); goto error; } while (0) |
8 #define PERROR(...) do { perr_func(__func__, __VA_ARGS__); goto error; } while (0) |
13 #define EERROR(_err, ...) do { eerr_func(__func__, (_err), __VA_ARGS__); goto error; } while (0) |
9 #define EERROR(_err, ...) do { eerr_func(__func__, (_err), __VA_ARGS__); goto error; } while (0) |
14 #define NERROR(...) do { err_func_nonl(__func__, __VA_ARGS__); goto error; } while (0) |
10 #define NERROR(...) do { err_func_nonl(__func__, __VA_ARGS__); goto error; } while (0) |