summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mongo/db/catalog/multi_index_block.cpp12
-rw-r--r--src/mongo/db/index/hash_access_method.cpp2
2 files changed, 4 insertions, 10 deletions
diff --git a/src/mongo/db/catalog/multi_index_block.cpp b/src/mongo/db/catalog/multi_index_block.cpp
index 36eb9c08eb2..60720c89443 100644
--- a/src/mongo/db/catalog/multi_index_block.cpp
+++ b/src/mongo/db/catalog/multi_index_block.cpp
@@ -433,17 +433,11 @@ StatusWith<std::vector<BSONObj>> MultiIndexBlock::init(OperationContext* opCtx,
} catch (const WriteConflictException&) {
throw;
} catch (...) {
- auto status = exceptionToStatus();
- std::string separator =
- (status.reason().size() > 0 && status.reason()[status.reason().size() - 1] == '.')
- ? ""
- : ".";
- return {status.code(),
+ return {exceptionToStatus().code(),
str::stream() << "Caught exception during index builder initialization "
<< collection->ns() << " (" << collection->uuid()
- << "): " << status.reason() << separator << " First index spec (of "
- << indexSpecs.size()
- << "): " << (indexSpecs.empty() ? BSONObj() : indexSpecs[0])};
+ << "): " << indexSpecs.size() << " provided. First index spec: "
+ << (indexSpecs.empty() ? BSONObj() : indexSpecs[0])};
}
}
diff --git a/src/mongo/db/index/hash_access_method.cpp b/src/mongo/db/index/hash_access_method.cpp
index 27c51f15c14..d7d91f48239 100644
--- a/src/mongo/db/index/hash_access_method.cpp
+++ b/src/mongo/db/index/hash_access_method.cpp
@@ -42,7 +42,7 @@ HashAccessMethod::HashAccessMethod(IndexCatalogEntry* btreeState, SortedDataInte
// We can change these if the single-field limitation is lifted later.
uassert(16763,
- "Hashed indices currently only support a single field.",
+ "Currently only single field hashed index supported.",
1 == descriptor->getNumFields());
uassert(16764,