author | Tero Marttila <terom@fixme.fi> |
Wed, 15 Oct 2008 01:14:22 +0300 | |
changeset 28 | e944453ca924 |
parent 24 | 82cfdb6680d1 |
child 33 | c71f3053c714 |
permissions | -rw-r--r-- |
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 |
|
28
e944453ca924
split off dbfs components into a separate dir, improve dirop docs, error handling, etc
Tero Marttila <terom@fixme.fi>
parents:
24
diff
changeset
|
11 |
// XXX: replace with *err_func(...) + exit(EXIT_FAILURE) |
11 | 12 |
#define FATAL(...) err_func_exit(__func__, __VA_ARGS__) |
13 |
#define PFATAL(...) perr_func_exit(__func__, __VA_ARGS__) |
|
28
e944453ca924
split off dbfs components into a separate dir, improve dirop docs, error handling, etc
Tero Marttila <terom@fixme.fi>
parents:
24
diff
changeset
|
14 |
#define EFATAL(_err, ...) eerr_func_exit(__func__, (_err), __VA_ARGS__) |
11 | 15 |
|
8 | 16 |
#endif /* LIB_ERROR_H */ |