14#ifndef OR_TOOLS_GLOP_STATUS_H_
15#define OR_TOOLS_GLOP_STATUS_H_
63 std::string error_message_;
70#define GLOP_RETURN_IF_ERROR(function_call) \
72 Status return_status = function_call; \
73 if (!return_status.ok()) return return_status; \
77#define GLOP_RETURN_AND_LOG_ERROR(error_code, message) \
79 std::string error_message = message; \
80 LOG(ERROR) << GetErrorCodeString(error_code) << ": " << error_message; \
81 return Status(error_code, error_message); \
85#define GLOP_RETURN_ERROR_IF_NULL(arg) \
86 if (arg == nullptr) { \
87 const std::string variable_name = #arg; \
88 std::string error_message = variable_name + " must not be null."; \
89 LOG(DFATAL) << error_message; \
90 return Status(Status::ERROR_NULL, error_message); \
const std::string & error_message() const
ErrorCode error_code() const
std::string GetErrorCodeString(Status::ErrorCode error_code)
The vehicle routing library lets one model and solve generic vehicle routing problems ranging from th...