summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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, 10 insertions, 4 deletions
diff --git a/src/mongo/db/catalog/multi_index_block.cpp b/src/mongo/db/catalog/multi_index_block.cpp
index 60720c89443..36eb9c08eb2 100644
--- a/src/mongo/db/catalog/multi_index_block.cpp
+++ b/src/mongo/db/catalog/multi_index_block.cpp
@@ -433,11 +433,17 @@ StatusWith<std::vector<BSONObj>> MultiIndexBlock::init(OperationContext* opCtx,
} catch (const WriteConflictException&) {
throw;
} catch (...) {
- return {exceptionToStatus().code(),
+ auto status = exceptionToStatus();
+ std::string separator =
+ (status.reason().size() > 0 && status.reason()[status.reason().size() - 1] == '.')
+ ? ""
+ : ".";
+ return {status.code(),
str::stream() << "Caught exception during index builder initialization "
<< collection->ns() << " (" << collection->uuid()
- << "): " << indexSpecs.size() << " provided. First index spec: "
- << (indexSpecs.empty() ? BSONObj() : indexSpecs[0])};
+ << "): " << status.reason() << separator << " First index spec (of "
+ << indexSpecs.size()
+ << "): " << (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 d7d91f48239..27c51f15c14 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,
- "Currently only single field hashed index supported.",
+ "Hashed indices currently only support a single field.",
1 == descriptor->getNumFields());
uassert(16764,