18 #ifndef FOEDUS_ERROR_CODE_HPP_
19 #define FOEDUS_ERROR_CODE_HPP_
75 #define X(a, b, c) a = b,
105 #define X_QUOTE(str) #str
106 #define X_EXPAND_AND_QUOTE(str) X_QUOTE(str)
107 #define X(a, b, c) case a: return X_EXPAND_AND_QUOTE(a);
113 return "Unexpected error code";
116 #undef X_EXPAND_AND_QUOTE
119 #define X(a, b, c) case a: return c;
125 return "Unexpected error code";
155 #define CHECK_ERROR_CODE(x)\
157 foedus::ErrorCode __e = x;\
158 if (UNLIKELY(__e != kErrorCodeOk)) {\
163 #endif // FOEDUS_ERROR_CODE_HPP_
Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
const char * get_error_name(ErrorCode code)
Returns the names of ErrorCode enum defined in error_code.xmacro.
Error code/message definition in X-Macro style.
const char * get_error_message(ErrorCode code)
Returns the error messages corresponding to ErrorCode enum defined in error_code.xmacro.
ErrorCode
Enum of error codes defined in error_code.xmacro.