terom@8: #ifndef LIB_ERROR_H terom@8: #define LIB_ERROR_H terom@8: terom@11: #include "log.h" terom@11: terom@8: #define ERROR(...) do { err_func(__func__, __VA_ARGS__); goto error; } while (0) terom@8: #define PERROR(...) do { perr_func(__func__, __VA_ARGS__); goto error; } while (0) terom@8: #define EERROR(_err, ...) do { eerr_func(__func__, (_err), __VA_ARGS__); goto error; } while (0) terom@8: terom@11: #define FATAL(...) err_func_exit(__func__, __VA_ARGS__) terom@11: #define PFATAL(...) perr_func_exit(__func__, __VA_ARGS__) terom@11: terom@8: #endif /* LIB_ERROR_H */