| author | Tero Marttila <terom@fixme.fi> |
| Wed, 01 May 2013 00:11:39 +0300 | |
| changeset 66 | fdd7f995af6c |
| parent 44 | 9e76ee9729b6 |
| permissions | -rw-r--r-- |
| 8 | 1 |
#ifndef LIB_ERROR_H |
2 |
#define LIB_ERROR_H |
|
3 |
||
| 11 | 4 |
#include "log.h" |
|
44
9e76ee9729b6
more work on the new evsql interface
Tero Marttila <terom@fixme.fi>
parents:
41
diff
changeset
|
5 |
#include "err.h" |
|
41
6abda2fa4579
touch up the Makefile, define err_t as unsigned int in error.h, and add some preliminary interrupt support, although it will always deadlock due to a bug in libfuse
Tero Marttila <terom@fixme.fi>
parents:
36
diff
changeset
|
6 |
|
| 8 | 7 |
#define ERROR(...) do { err_func(__func__, __VA_ARGS__); goto error; } while (0)
|
8 |
#define PERROR(...) do { perr_func(__func__, __VA_ARGS__); goto error; } while (0)
|
|
9 |
#define EERROR(_err, ...) do { eerr_func(__func__, (_err), __VA_ARGS__); goto error; } while (0)
|
|
| 24 | 10 |
#define NERROR(...) do { err_func_nonl(__func__, __VA_ARGS__); goto error; } while (0)
|
| 33 | 11 |
#define SERROR(_err) do { (_err); goto error; } while (0)
|
|
36
56427f22e969
tweak debug/info output, implement dbfs_unlink with slightly improved error macros handling
Tero Marttila <terom@fixme.fi>
parents:
33
diff
changeset
|
12 |
#define XERROR(_err, ...) do { (_err); err_func(__func__, __VA_ARGS__); goto error; } while (0)
|
|
56427f22e969
tweak debug/info output, implement dbfs_unlink with slightly improved error macros handling
Tero Marttila <terom@fixme.fi>
parents:
33
diff
changeset
|
13 |
#define NXERROR(_err, ...) do { (_err); err_func_nonl(__func__, __VA_ARGS__); goto error; } while (0)
|
| 8 | 14 |
|
|
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
|
15 |
// XXX: replace with *err_func(...) + exit(EXIT_FAILURE) |
| 11 | 16 |
#define FATAL(...) err_func_exit(__func__, __VA_ARGS__) |
17 |
#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
|
18 |
#define EFATAL(_err, ...) eerr_func_exit(__func__, (_err), __VA_ARGS__) |
| 11 | 19 |
|
| 8 | 20 |
#endif /* LIB_ERROR_H */ |