diff options
author | Mathias Stearn <mathias@10gen.com> | 2017-10-24 12:27:15 -0400 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2017-11-02 14:25:21 -0400 |
commit | a963b8641cf2ab2cd0ccbbde04993a8224dcf52a (patch) | |
tree | f976216a9b16d32f277d598db65b2fcd4ca43e9d /src/mongo/db/lasterror.cpp | |
parent | d244eadffa8eb5aa714e3e881922c19532e1bd8b (diff) | |
download | mongo-a963b8641cf2ab2cd0ccbbde04993a8224dcf52a.tar.gz |
SERVER-31629 Replace ErrorCodes::fromInt() with ErrorCodes::Error()
No reason to have two ways to express the same thing, and we can't get rid of
ErrorCodes::Error().
Diffstat (limited to 'src/mongo/db/lasterror.cpp')
-rw-r--r-- | src/mongo/db/lasterror.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/lasterror.cpp b/src/mongo/db/lasterror.cpp index c9d9aca453e..0595212646e 100644 --- a/src/mongo/db/lasterror.cpp +++ b/src/mongo/db/lasterror.cpp @@ -53,7 +53,7 @@ void LastError::setLastError(int code, std::string msg) { _code = code; _msg = std::move(msg); - if (ErrorCodes::isNotMasterError(ErrorCodes::fromInt(_code))) + if (ErrorCodes::isNotMasterError(ErrorCodes::Error(_code))) _hadNotMasterError = true; } @@ -91,7 +91,7 @@ bool LastError::appendSelf(BSONObjBuilder& b, bool blankErr) const { if (_code) { b.append("code", _code); - b.append("codeName", ErrorCodes::errorString(ErrorCodes::fromInt(_code))); + b.append("codeName", ErrorCodes::errorString(ErrorCodes::Error(_code))); } if (_updatedExisting != NotUpdate) b.appendBool("updatedExisting", _updatedExisting == True); |