diff options
Diffstat (limited to 'src/mongo/s')
-rw-r--r-- | src/mongo/s/async_requests_sender.cpp | 2 | ||||
-rw-r--r-- | src/mongo/s/catalog/sharding_catalog_shard_collection_test.cpp | 2 | ||||
-rw-r--r-- | src/mongo/s/client/parallel.cpp | 2 | ||||
-rw-r--r-- | src/mongo/s/client/sharding_connection_hook.cpp | 4 | ||||
-rw-r--r-- | src/mongo/s/stale_exception.h | 7 |
5 files changed, 7 insertions, 10 deletions
diff --git a/src/mongo/s/async_requests_sender.cpp b/src/mongo/s/async_requests_sender.cpp index 55f63010a13..71080bad767 100644 --- a/src/mongo/s/async_requests_sender.cpp +++ b/src/mongo/s/async_requests_sender.cpp @@ -94,7 +94,7 @@ AsyncRequestsSender::Response AsyncRequestsSender::next() { if (_interruptStatus.isOK()) { try { _notification->get(_opCtx); - } catch (const UserException& ex) { + } catch (const AssertionException& ex) { // If the operation is interrupted, we cancel outstanding requests and switch to // waiting for the (canceled) callbacks to finish without checking for interrupts. _interruptStatus = ex.toStatus(); diff --git a/src/mongo/s/catalog/sharding_catalog_shard_collection_test.cpp b/src/mongo/s/catalog/sharding_catalog_shard_collection_test.cpp index ae0ea1b4b56..b6229735979 100644 --- a/src/mongo/s/catalog/sharding_catalog_shard_collection_test.cpp +++ b/src/mongo/s/catalog/sharding_catalog_shard_collection_test.cpp @@ -141,7 +141,7 @@ TEST_F(ShardCollectionTest, anotherMongosSharding) { false, vector<BSONObj>{}, false), - UserException, + AssertionException, ErrorCodes::ManualInterventionRequired); } diff --git a/src/mongo/s/client/parallel.cpp b/src/mongo/s/client/parallel.cpp index a7ddaefbe54..23594f586da 100644 --- a/src/mongo/s/client/parallel.cpp +++ b/src/mongo/s/client/parallel.cpp @@ -68,7 +68,7 @@ void throwCursorError(DBClientCursor* cursor) { if (cursor->hasResultFlag(ResultFlag_ErrSet)) { BSONObj o = cursor->next(); - throw UserException(o["code"].numberInt(), o["$err"].str()); + throw AssertionException(o["code"].numberInt(), o["$err"].str()); } } diff --git a/src/mongo/s/client/sharding_connection_hook.cpp b/src/mongo/s/client/sharding_connection_hook.cpp index 743a158ca13..f2325d4c88a 100644 --- a/src/mongo/s/client/sharding_connection_hook.cpp +++ b/src/mongo/s/client/sharding_connection_hook.cpp @@ -54,8 +54,8 @@ ShardingConnectionHook::ShardingConnectionHook(bool shardedConnections, void ShardingConnectionHook::onCreate(DBClientBase* conn) { if (conn->type() == ConnectionString::INVALID) { - throw UserException(ErrorCodes::BadValue, - str::stream() << "Unrecognized connection string."); + throw AssertionException(ErrorCodes::BadValue, + str::stream() << "Unrecognized connection string."); } // Authenticate as the first thing we do diff --git a/src/mongo/s/stale_exception.h b/src/mongo/s/stale_exception.h index 1661320db8e..36f30c7fecb 100644 --- a/src/mongo/s/stale_exception.h +++ b/src/mongo/s/stale_exception.h @@ -81,14 +81,11 @@ public: * stale config exceptions in a map and this requires a default constructor. */ StaleConfigException() - : AssertionException(0, "initializing empty stale config exception object") {} + : AssertionException(ErrorCodes::InternalError, + "initializing empty stale config exception object") {} virtual ~StaleConfigException() throw() {} - virtual void appendPrefix(std::stringstream& ss) const { - ss << "stale sharding config exception: "; - } - std::string getns() const { return _ns; } |