diff options
author | Natalia Jacobowitz <nataliajacobowitz@MacBook-Pro-107.local> | 2017-06-30 13:47:12 -0400 |
---|---|---|
committer | Natalia Jacobowitz <nataliajacobowitz@MacBook-Pro-107.local> | 2017-07-06 10:09:08 -0400 |
commit | 6bea80a6dd1b5e41103e7a1d3b8a6ecd6ae22cd6 (patch) | |
tree | 56b0c6df1c9ce9b1911db4225470c78438faecaf /src/mongo/db/dbhelpers.cpp | |
parent | d3ebfcad840947a3d9efd59ccb966ee9884fa865 (diff) | |
download | mongo-6bea80a6dd1b5e41103e7a1d3b8a6ecd6ae22cd6.tar.gz |
SERVER-27699 Capture actual error from getExecutor
Diffstat (limited to 'src/mongo/db/dbhelpers.cpp')
-rw-r--r-- | src/mongo/db/dbhelpers.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/mongo/db/dbhelpers.cpp b/src/mongo/db/dbhelpers.cpp index 4769c16b658..24f5501dba1 100644 --- a/src/mongo/db/dbhelpers.cpp +++ b/src/mongo/db/dbhelpers.cpp @@ -118,13 +118,9 @@ RecordId Helpers::findOne(OperationContext* opCtx, unique_ptr<CanonicalQuery> cq = std::move(statusWithCQ.getValue()); size_t options = requireIndex ? QueryPlannerParams::NO_TABLE_SCAN : QueryPlannerParams::DEFAULT; - auto statusWithPlanExecutor = - getExecutor(opCtx, collection, std::move(cq), PlanExecutor::NO_YIELD, options); - massert(17245, - "Could not get executor for query " + query.toString(), - statusWithPlanExecutor.isOK()); + auto exec = uassertStatusOK( + getExecutor(opCtx, collection, std::move(cq), PlanExecutor::NO_YIELD, options)); - auto exec = std::move(statusWithPlanExecutor.getValue()); PlanExecutor::ExecState state; BSONObj obj; RecordId loc; |