diff options
author | Mathias Stearn <mathias@10gen.com> | 2017-08-01 14:47:28 -0400 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2017-08-16 16:28:02 -0400 |
commit | 5a1b0681dcee481f631dc647000b895e20cc7cfd (patch) | |
tree | 57b1d42d0eb94750d3855cba6886700776022d31 /src/mongo/s/client | |
parent | c593ea7bb9815ced064ad8aa7ffa206fa94757c4 (diff) | |
download | mongo-5a1b0681dcee481f631dc647000b895e20cc7cfd.tar.gz |
SERVER-30580 Eliminate DBException::getCode() in favor of code()
Diffstat (limited to 'src/mongo/s/client')
-rw-r--r-- | src/mongo/s/client/parallel.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/s/client/parallel.cpp b/src/mongo/s/client/parallel.cpp index 8a3506f8217..0341cacaf5d 100644 --- a/src/mongo/s/client/parallel.cpp +++ b/src/mongo/s/client/parallel.cpp @@ -395,7 +395,7 @@ void ParallelSortClusteredCursor::setupVersionAndHandleSlaveOk( << "compatible with " << vinfo; } } catch (const DBException& dbExcep) { - auto errCode = dbExcep.getCode(); + auto errCode = dbExcep.code(); if (allowShardVersionFailure && (ErrorCodes::isNotMasterError(ErrorCodes::fromInt(errCode)) || errCode == ErrorCodes::FailedToSatisfyReadPreference || @@ -646,7 +646,7 @@ void ParallelSortClusteredCursor::startInit(OperationContext* opCtx) { warning() << "db exception when initializing on " << shardId << ", current connection state is " << mdata.toBSON() << causedBy(redact(e)); mdata.errored = true; - if (returnPartial && e.getCode() == 15925 /* From above! */) { + if (returnPartial && e.code() == 15925 /* From above! */) { mdata.cleanup(true); continue; } @@ -790,7 +790,7 @@ void ParallelSortClusteredCursor::finishInit(OperationContext* opCtx) { } catch (DBException& e) { // NOTE: RECV() WILL NOT THROW A SOCKET EXCEPTION - WE GET THIS AS ERROR 15988 FROM // ABOVE - if (e.getCode() == 15988) { + if (e.code() == 15988) { warning() << "exception when receiving data from " << shardId << ", current connection state is " << mdata.toBSON() << causedBy(redact(e)); @@ -804,7 +804,7 @@ void ParallelSortClusteredCursor::finishInit(OperationContext* opCtx) { } else { // the InvalidBSON exception indicates that the BSON is malformed -> // don't print/call "mdata.toBSON()" to avoid unexpected errors e.g. a segfault - if (e.getCode() == 22) + if (e.code() == ErrorCodes::InvalidBSON) warning() << "bson is malformed :: db exception when finishing on " << shardId << causedBy(redact(e)); else |