summaryrefslogtreecommitdiff
path: root/src/mongo/executor
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2018-04-24 16:58:23 -0400
committerMathias Stearn <mathias@10gen.com>2018-05-08 14:57:37 -0400
commit589af3820b00ed0b7ac26a84cfeed6554ab191f3 (patch)
treebb393adad8b1ca4f6f0e23c035141e829e3eeee6 /src/mongo/executor
parent98f28d452b9b330d6c1696d6d8207b582a5870fc (diff)
downloadmongo-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.cpp4
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));