summaryrefslogtreecommitdiff
path: root/src/mongo/client/mongo_uri.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/client/mongo_uri.cpp')
-rw-r--r--src/mongo/client/mongo_uri.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/mongo/client/mongo_uri.cpp b/src/mongo/client/mongo_uri.cpp
index e11f9b0a06f..433c33c8e61 100644
--- a/src/mongo/client/mongo_uri.cpp
+++ b/src/mongo/client/mongo_uri.cpp
@@ -169,8 +169,7 @@ MongoURI::OptionsMap parseOptions(StringData options, StringData url) {
if (opt.empty()) {
uasserted(ErrorCodes::FailedToParse,
str::stream()
- << "Missing a key/value pair in the options for mongodb:// URL: "
- << url);
+ << "Missing a key/value pair in the options for mongodb:// URL: " << url);
}
const auto kvPair = partitionForward(opt, '=');
@@ -190,8 +189,7 @@ MongoURI::OptionsMap parseOptions(StringData options, StringData url) {
if (valRaw.empty()) {
uasserted(ErrorCodes::FailedToParse,
str::stream() << "Missing value for key '" << keyRaw
- << "' in the options for mongodb:// URL: "
- << url);
+ << "' in the options for mongodb:// URL: " << url);
}
const auto val = uassertStatusOKWithContext(
uriDecode(valRaw),
@@ -259,8 +257,7 @@ URIParts::URIParts(StringData uri) {
if (schemeEnd == std::string::npos) {
uasserted(ErrorCodes::FailedToParse,
str::stream() << "URI must begin with " << kURIPrefix << " or " << kURISRVPrefix
- << ": "
- << uri);
+ << ": " << uri);
}
const auto uriWithoutPrefix = uri.substr(schemeEnd + 3);
scheme = uri.substr(0, schemeEnd);
@@ -380,10 +377,10 @@ MongoURI MongoURI::parseImpl(const std::string& url) {
}
if ((host.find('/') != std::string::npos) && !StringData(host).endsWith(".sock")) {
- uasserted(
- ErrorCodes::FailedToParse,
- str::stream() << "'" << host << "' in '" << url
- << "' appears to be a unix socket, but does not end in '.sock'");
+ uasserted(ErrorCodes::FailedToParse,
+ str::stream()
+ << "'" << host << "' in '" << url
+ << "' appears to be a unix socket, but does not end in '.sock'");
}
servers.push_back(uassertStatusOK(HostAndPort::parse(host)));