20 #include "mongo/base/status.h"
48 StatusWith(ErrorCodes::Error code,
const std::string& reason,
int location = 0)
49 : _status(
Status(code, reason, location)) {}
63 const T& getValue()
const {
66 const Status& getStatus()
const {
71 return _status.isOK();
74 std::string toString()
const {
75 return _status.toString();
Status represents an error state or the absence thereof.
Definition: status.h:50
StatusWith(const Status &status)
for the error case
Definition: status_with.h:54
Utility functions for parsing numbers from strings.
Definition: compare_numbers.h:20
Definition: status_with.h:43
StatusWith(const T &t)
for the OK case
Definition: status_with.h:61
MONGO_CLIENT_API Status(MONGO_CLIENT_FUNC *saslClientAuthenticate)(DBClientWithCommands *client
Attempts to authenticate "client" using the SASL protocol.
StatusWith(ErrorCodes::Error code, const std::string &reason, int location=0)
for the error case
Definition: status_with.h:48