diff options
Diffstat (limited to 'src/mongo/shell/bench.cpp')
| -rw-r--r-- | src/mongo/shell/bench.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mongo/shell/bench.cpp b/src/mongo/shell/bench.cpp index 040002f5c6e..338477ebe56 100644 --- a/src/mongo/shell/bench.cpp +++ b/src/mongo/shell/bench.cpp @@ -674,7 +674,7 @@ void BenchRunWorker::generateLoadOnConnection(DBClientBase* conn) { invariant(bsonTemplateEvaluator.setId(_id) == BsonTemplateEvaluator::StatusSuccess); if (_config->username != "") { - string errmsg; + std::string errmsg; if (!conn->auth("admin", _config->username, _config->password, errmsg)) { uasserted(15931, "Authenticating to connection for _benchThread failed: " + errmsg); } @@ -918,7 +918,7 @@ void BenchRunWorker::generateLoadOnConnection(DBClientBase* conn) { if (!result["err"].eoo() && result["err"].type() == String && (_config->throwGLE || op.throwGLE)) - throw DBException((string) "From benchRun GLE" + + throw DBException((std::string) "From benchRun GLE" + causedBy(result["err"].String()), result["code"].eoo() ? 0 : result["code"].Int()); } @@ -984,7 +984,7 @@ void BenchRunWorker::generateLoadOnConnection(DBClientBase* conn) { if (!result["err"].eoo() && result["err"].type() == String && (_config->throwGLE || op.throwGLE)) - throw DBException((string) "From benchRun GLE" + + throw DBException((std::string) "From benchRun GLE" + causedBy(result["err"].String()), result["code"].eoo() ? 0 : result["code"].Int()); } @@ -1031,7 +1031,7 @@ void BenchRunWorker::generateLoadOnConnection(DBClientBase* conn) { if (!result["err"].eoo() && result["err"].type() == String && (_config->throwGLE || op.throwGLE)) - throw DBException((string) "From benchRun GLE " + + throw DBException((std::string) "From benchRun GLE " + causedBy(result["err"].String()), result["code"].eoo() ? 0 : result["code"].Int()); } @@ -1133,7 +1133,7 @@ void BenchRunWorker::run() { try { std::unique_ptr<DBClientBase> conn(_config->createConnection()); if (!_config->username.empty()) { - string errmsg; + std::string errmsg; if (!conn->auth("admin", _config->username, _config->password, errmsg)) { uasserted(15932, "Authenticating to connection for benchThread failed: " + errmsg); } @@ -1165,7 +1165,7 @@ void BenchRunner::start() { std::unique_ptr<DBClientBase> conn(_config->createConnection()); // Must authenticate to admin db in order to run serverStatus command if (_config->username != "") { - string errmsg; + std::string errmsg; if (!conn->auth("admin", _config->username, _config->password, errmsg)) { uasserted( 16704, @@ -1201,7 +1201,7 @@ void BenchRunner::stop() { { std::unique_ptr<DBClientBase> conn(_config->createConnection()); if (_config->username != "") { - string errmsg; + std::string errmsg; // this can only fail if admin access was revoked since start of run if (!conn->auth("admin", _config->username, _config->password, errmsg)) { uasserted( |
