summaryrefslogtreecommitdiff
path: root/src/mongo/db/ttl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/ttl.cpp')
-rw-r--r--src/mongo/db/ttl.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mongo/db/ttl.cpp b/src/mongo/db/ttl.cpp
index 1e5be6b1900..711bafcc8d4 100644
--- a/src/mongo/db/ttl.cpp
+++ b/src/mongo/db/ttl.cpp
@@ -378,13 +378,14 @@ private:
PlanExecutor::YIELD_AUTO,
direction);
- Status result = exec->executePlan();
- if (!result.isOK()) {
+ try {
+ exec->executePlan();
+ } catch (const DBException& exception) {
LOGV2_ERROR(22543,
"ttl query execution for index {index} failed with status: {error}",
"TTL query execution failed",
"index"_attr = idx,
- "error"_attr = redact(result));
+ "error"_attr = redact(exception.toStatus()));
return;
}