summaryrefslogtreecommitdiff
path: root/src/mongo/base
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2018-01-08 17:42:04 -0500
committerMathias Stearn <mathias@10gen.com>2018-01-17 17:10:47 -0500
commit84c3f83421b262028081296e4c387d29691ea376 (patch)
tree802785c4a4cd2f6a2f7ffb8c2a2193f7c06e1313 /src/mongo/base
parent076a499621f7b423d6541dc96254e7c947c33413 (diff)
downloadmongo-84c3f83421b262028081296e4c387d29691ea376.tar.gz
SERVER-32586 Convert ResolvedView to use ErrorExtraInfo
Diffstat (limited to 'src/mongo/base')
-rw-r--r--src/mongo/base/error_codes.err2
-rw-r--r--src/mongo/base/status_test.cpp12
2 files changed, 2 insertions, 12 deletions
diff --git a/src/mongo/base/error_codes.err b/src/mongo/base/error_codes.err
index 66ffa19a2f4..ff50d9173f4 100644
--- a/src/mongo/base/error_codes.err
+++ b/src/mongo/base/error_codes.err
@@ -167,7 +167,7 @@ error_code("ViewDepthLimitExceeded", 165)
error_code("CommandNotSupportedOnView", 166)
error_code("OptionNotSupportedOnView", 167)
error_code("InvalidPipelineOperator", 168)
-error_code("CommandOnShardedViewNotSupportedOnMongod", 169)
+error_code("CommandOnShardedViewNotSupportedOnMongod", 169, extra='ResolvedView')
error_code("TooManyMatchingDocuments", 170)
error_code("CannotIndexParallelArrays", 171)
error_code("TransportSessionClosed", 172)
diff --git a/src/mongo/base/status_test.cpp b/src/mongo/base/status_test.cpp
index f99b0844a7b..dd6dbada01c 100644
--- a/src/mongo/base/status_test.cpp
+++ b/src/mongo/base/status_test.cpp
@@ -268,19 +268,9 @@ TEST(Transformers, ExceptionToStatus) {
ASSERT_TRUE(fromBoostExcept.reason().find("boost::exception") != std::string::npos);
}
-// TODO enable this once the next ErrorExtraInfo subclass is registered
-#if false
-DEATH_TEST(ErrorExtraInfo, InvariantAllRegistered, "Invariant failure parser_for::") {
+DEATH_TEST(ErrorExtraInfo, InvariantAllRegistered, "Invariant failure parsers::") {
ErrorExtraInfo::invariantHaveAllParsers();
}
-#else
-TEST(ErrorExtraInfo, MakeSureInvariantAllRegisteredGetsEnabled) {
- // This will be the first "real" use of ErrorExtraInfo, and it won't be linked into this test.
- // This just exists to ensure that once that work is done, the above test gets enabled.
- invariant(
- !ErrorCodes::shouldHaveExtraInfo(ErrorCodes::CommandOnShardedViewNotSupportedOnMongod));
-}
-#endif
#ifdef MONGO_CONFIG_DEBUG_BUILD
DEATH_TEST(ErrorExtraInfo, DassertShouldHaveExtraInfo, "Fatal Assertion 40680") {