diff options
author | Mathias Stearn <mathias@10gen.com> | 2017-10-24 12:27:15 -0400 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2017-11-02 14:25:21 -0400 |
commit | a963b8641cf2ab2cd0ccbbde04993a8224dcf52a (patch) | |
tree | f976216a9b16d32f277d598db65b2fcd4ca43e9d /src/mongo/rpc/write_concern_error_detail.cpp | |
parent | d244eadffa8eb5aa714e3e881922c19532e1bd8b (diff) | |
download | mongo-a963b8641cf2ab2cd0ccbbde04993a8224dcf52a.tar.gz |
SERVER-31629 Replace ErrorCodes::fromInt() with ErrorCodes::Error()
No reason to have two ways to express the same thing, and we can't get rid of
ErrorCodes::Error().
Diffstat (limited to 'src/mongo/rpc/write_concern_error_detail.cpp')
-rw-r--r-- | src/mongo/rpc/write_concern_error_detail.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/rpc/write_concern_error_detail.cpp b/src/mongo/rpc/write_concern_error_detail.cpp index 1b63898daeb..110131a40ce 100644 --- a/src/mongo/rpc/write_concern_error_detail.cpp +++ b/src/mongo/rpc/write_concern_error_detail.cpp @@ -70,7 +70,7 @@ BSONObj WriteConcernErrorDetail::toBSON() const { if (_isErrCodeSet) { builder.append(errCode(), _errCode); - builder.append(errCodeName(), ErrorCodes::errorString(ErrorCodes::fromInt(_errCode))); + builder.append(errCodeName(), ErrorCodes::errorString(ErrorCodes::Error(_errCode))); } if (_isErrInfoSet) @@ -96,7 +96,7 @@ bool WriteConcernErrorDetail::parseBSON(const BSONObj& source, string* errMsg) { return false; _isErrCodeSet = fieldState == FieldParser::FIELD_SET; if (_isErrCodeSet) { - _errCode = ErrorCodes::fromInt(errCodeValue); + _errCode = ErrorCodes::Error(errCodeValue); } fieldState = FieldParser::extract(source, errInfo, &_errInfo, errMsg); |