src/lib/error.h
changeset 36 56427f22e969
parent 33 c71f3053c714
child 41 6abda2fa4579
equal deleted inserted replaced
35:4f10421681d2 36:56427f22e969
     6 #define ERROR(...) do { err_func(__func__, __VA_ARGS__); goto error; } while (0)
     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)
     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)
     8 #define EERROR(_err, ...) do { eerr_func(__func__, (_err), __VA_ARGS__); goto error; } while (0)
     9 #define NERROR(...) do { err_func_nonl(__func__, __VA_ARGS__); goto error; } while (0)
     9 #define NERROR(...) do { err_func_nonl(__func__, __VA_ARGS__); goto error; } while (0)
    10 #define SERROR(_err) do { (_err); goto error; } while (0)
    10 #define SERROR(_err) do { (_err); goto error; } while (0)
       
    11 #define XERROR(_err, ...) do { (_err); err_func(__func__, __VA_ARGS__); goto error; } while (0)
       
    12 #define NXERROR(_err, ...) do { (_err); err_func_nonl(__func__, __VA_ARGS__); goto error; } while (0)
    11 
    13 
    12 // XXX: replace with *err_func(...) + exit(EXIT_FAILURE)
    14 // XXX: replace with *err_func(...) + exit(EXIT_FAILURE)
    13 #define FATAL(...) err_func_exit(__func__, __VA_ARGS__)
    15 #define FATAL(...) err_func_exit(__func__, __VA_ARGS__)
    14 #define PFATAL(...) perr_func_exit(__func__, __VA_ARGS__)
    16 #define PFATAL(...) perr_func_exit(__func__, __VA_ARGS__)
    15 #define EFATAL(_err, ...) eerr_func_exit(__func__, (_err), __VA_ARGS__)
    17 #define EFATAL(_err, ...) eerr_func_exit(__func__, (_err), __VA_ARGS__)