diff options
Diffstat (limited to 'src/mongo/db/s/shardsvr_move_primary_command.cpp')
-rw-r--r-- | src/mongo/db/s/shardsvr_move_primary_command.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/db/s/shardsvr_move_primary_command.cpp b/src/mongo/db/s/shardsvr_move_primary_command.cpp index 55170519081..d707cdfccc0 100644 --- a/src/mongo/db/s/shardsvr_move_primary_command.cpp +++ b/src/mongo/db/s/shardsvr_move_primary_command.cpp @@ -101,11 +101,12 @@ public: uassert( ErrorCodes::InvalidNamespace, - str::stream() << "invalid db name specified: " << dbName.db(), + str::stream() << "invalid db name specified: " << dbName.toStringForErrorMsg(), NamespaceString::validDBName(dbName, NamespaceString::DollarInDbNameBehavior::Allow)); uassert(ErrorCodes::InvalidOptions, - str::stream() << "Can't move primary for " << dbName.db() << " database", + str::stream() << "Can't move primary for " << dbName.toStringForErrorMsg() + << " database", !dbNss.isOnInternalDb()); uassert(ErrorCodes::InvalidOptions, |