Kinetic C/C++ Client
 All Classes Functions Variables Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
kinetic::Status Class Reference

Indicates the success/failure of an operation. Frequently when calling a Kinetic client method you'll do something like: More...

#include <status.h>

Public Member Functions

bool ok () const
 True if the operation succeeded.
 
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 Public Member Functions

static Status makeOk ()
 Helper for easily making a Status object indicating success.
 
static Status makeInternalError (std::string error_message)
 Helper for easily making a Status object indicating a generic error.
 

Protected Member Functions

 Status (std::string error_message)
 The error as an std::string or an empty std::string if the operation succeeded.
 

Detailed Description

Indicates the success/failure of an operation. Frequently when calling a Kinetic client method you'll do something like:

CHECK(some_class->operation().ok());

or maybe

if (some_class->operation().notOk()) {
handleTheError();
}

Definition at line 41 of file status.h.


The documentation for this class was generated from the following file: