diff options
author | Andy Schwerin <schwerin@10gen.com> | 2012-10-29 13:11:11 -0400 |
---|---|---|
committer | Andy Schwerin <schwerin@10gen.com> | 2012-11-01 23:06:51 -0400 |
commit | 79c550530065678d1611567cf262a7b325c2db47 (patch) | |
tree | d7f61dc27a788b4461811494f6fcf7efbcb136ea /src/mongo/base/status.h | |
parent | bd5d48f9c57df96e2a11933057e9a90392a89e40 (diff) | |
download | mongo-79c550530065678d1611567cf262a7b325c2db47.tar.gz |
Add an isOK method to Status, and methods to get an ErrorCodes::Error from a string or an int.
Diffstat (limited to 'src/mongo/base/status.h')
-rw-r--r-- | src/mongo/base/status.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mongo/base/status.h b/src/mongo/base/status.h index ed3266566cd..d71852c6c41 100644 --- a/src/mongo/base/status.h +++ b/src/mongo/base/status.h @@ -82,6 +82,7 @@ namespace mongo { // accessors // + bool isOK() const { return code() == ErrorCodes::OK; } ErrorCodes::Error code() const { return _error->code; } const char* codeString() const { return ErrorCodes::errorString(_error->code); } const std::string& reason() const { return _error->reason; } |