summaryrefslogtreecommitdiff
path: root/src/mongo/s/commands/cluster_kill_op.cpp
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2018-05-02 17:32:34 -0400
committerMathias Stearn <mathias@10gen.com>2018-05-08 14:57:37 -0400
commitdb41862c5380ab33cf28db99726cdac252df0872 (patch)
treea0fefd08ea9cc063456abe796390faaaa07ec272 /src/mongo/s/commands/cluster_kill_op.cpp
parent2d35461cb54e35afea223714fab1a184a9b381e2 (diff)
downloadmongo-db41862c5380ab33cf28db99726cdac252df0872.tar.gz
SERVER-34628 Really remove appendCommandStatus
All remaining callers are transitioned to some form of usassert. This was done with an elaborate set of vim macros to make this tractable. Therefore it should not be considered an example of the best way to write new code, just as an improvement on what was there before. In particular, I couldn't easily remove Status's that are named then only used once in uassertStatusOK, nor could I convert the pattern of checking a StatusWith<T>'s getStatus() then calling getValue() to just call uassertStatusOK(returnsStatusWith()).
Diffstat (limited to 'src/mongo/s/commands/cluster_kill_op.cpp')
-rw-r--r--src/mongo/s/commands/cluster_kill_op.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/mongo/s/commands/cluster_kill_op.cpp b/src/mongo/s/commands/cluster_kill_op.cpp
index 3e4b38d5bd8..232380d5dfc 100644
--- a/src/mongo/s/commands/cluster_kill_op.cpp
+++ b/src/mongo/s/commands/cluster_kill_op.cpp
@@ -99,9 +99,7 @@ private:
// Will throw if shard id is not found
auto shardStatus = Grid::get(opCtx)->shardRegistry()->getShard(opCtx, shardIdent);
- if (!shardStatus.isOK()) {
- return CommandHelpers::appendCommandStatus(result, shardStatus.getStatus());
- }
+ uassertStatusOK(shardStatus.getStatus());
auto shard = shardStatus.getValue();
int opId;