diff options
author | Mathias Stearn <mathias@10gen.com> | 2018-04-24 16:58:23 -0400 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2018-05-08 14:57:37 -0400 |
commit | 589af3820b00ed0b7ac26a84cfeed6554ab191f3 (patch) | |
tree | bb393adad8b1ca4f6f0e23c035141e829e3eeee6 /src/mongo/executor | |
parent | 98f28d452b9b330d6c1696d6d8207b582a5870fc (diff) | |
download | mongo-589af3820b00ed0b7ac26a84cfeed6554ab191f3.tar.gz |
SERVER-34628 Prep for removing appendCommandStatus
* Added appendCommandStatusNoThrow matching the current aCS behavior
* Make appendCommandStatus call uassertStatusOK then aCS on success
* Make the few places that need to not throw call aCSNT
A following commit will completely remove appendCommandStatus. It is split out
because that commit is fairly huge.
Diffstat (limited to 'src/mongo/executor')
-rw-r--r-- | src/mongo/executor/network_test_env.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/executor/network_test_env.cpp b/src/mongo/executor/network_test_env.cpp index a1b16aa192e..bc782c8ce8c 100644 --- a/src/mongo/executor/network_test_env.cpp +++ b/src/mongo/executor/network_test_env.cpp @@ -51,7 +51,7 @@ void NetworkTestEnv::onCommand(OnCommandFunction func) { if (resultStatus.isOK()) { BSONObjBuilder result(std::move(resultStatus.getValue())); - CommandHelpers::appendCommandStatus(result, resultStatus.getStatus()); + CommandHelpers::appendCommandStatusNoThrow(result, resultStatus.getStatus()); const RemoteCommandResponse response(result.obj(), BSONObj(), Milliseconds(1)); _mockNetwork->scheduleResponse(noi, _mockNetwork->now(), response); @@ -74,7 +74,7 @@ void NetworkTestEnv::onCommandWithMetadata(OnCommandWithMetadataFunction func) { if (cmdResponseStatus.isOK()) { BSONObjBuilder result(std::move(cmdResponseStatus.data)); - CommandHelpers::appendCommandStatus(result, cmdResponseStatus.status); + CommandHelpers::appendCommandStatusNoThrow(result, cmdResponseStatus.status); const RemoteCommandResponse response( result.obj(), cmdResponseStatus.metadata, Milliseconds(1)); |