21 #ifndef KINETIC_CPP_CLIENT_STATUS_H_
22 #define KINETIC_CPP_CLIENT_STATUS_H_
50 return Status(error_message);
55 return error_message_ ==
"";
66 return error_message_;
72 explicit Status(std::string error_message)
73 : error_message_(error_message) {
77 string error_message_;
82 #endif // KINETIC_CPP_CLIENT_STATUS_H_
Status(std::string error_message)
The error as an std::string or an empty std::string if the operation succeeded.
static Status makeInternalError(std::string error_message)
Helper for easily making a Status object indicating a generic error.
bool notOk() const
False if anything went wrong. Details available in ToString.
std::string ToString() const
Returns a human-friendly description of what went wrong, or "OK" if there was no error.
static Status makeOk()
Helper for easily making a Status object indicating success.
bool ok() const
True if the operation succeeded.
Indicates the success/failure of an operation. Frequently when calling a Kinetic client method you'll...