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/session.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/session.cpp')
-rw-r--r-- | src/mongo/db/session.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mongo/db/session.cpp b/src/mongo/db/session.cpp index e5a76b208ec..9db409e8f06 100644 --- a/src/mongo/db/session.cpp +++ b/src/mongo/db/session.cpp @@ -507,8 +507,7 @@ void Session::_registerUpdateCacheOnCommit(OperationContext* opCtx, const auto failBeforeCommitExceptionElem = data["failBeforeCommitExceptionCode"]; if (!failBeforeCommitExceptionElem.eoo()) { - const auto failureCode = - ErrorCodes::fromInt(int(failBeforeCommitExceptionElem.Number())); + const auto failureCode = ErrorCodes::Error(int(failBeforeCommitExceptionElem.Number())); uasserted(failureCode, str::stream() << "Failing write for " << _sessionId << ":" << newTxnNumber << " due to failpoint. The write must not be reflected."); |