src/lib/error.h
author Tero Marttila <terom@fixme.fi>
Mon, 13 Oct 2008 02:27:59 +0300
changeset 27 461be4cd34a3
parent 24 82cfdb6680d1
child 28 e944453ca924
permissions -rw-r--r--
working open/read/close -dir
#ifndef LIB_ERROR_H
#define LIB_ERROR_H

#include "log.h"

#define ERROR(...) do { err_func(__func__, __VA_ARGS__); goto error; } while (0)
#define PERROR(...) do { perr_func(__func__, __VA_ARGS__); goto error; } while (0)
#define EERROR(_err, ...) do { eerr_func(__func__, (_err), __VA_ARGS__); goto error; } while (0)
#define NERROR(...) do { err_func_nonl(__func__, __VA_ARGS__); goto error; } while (0)

#define FATAL(...) err_func_exit(__func__, __VA_ARGS__)
#define PFATAL(...) perr_func_exit(__func__, __VA_ARGS__)

#endif /* LIB_ERROR_H */