summaryrefslogtreecommitdiff
path: root/src/mongo/bson/util
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2017-08-14 16:16:07 -0400
committerMathias Stearn <mathias@10gen.com>2017-08-16 16:28:02 -0400
commitfe72cc35ff8af7bf421d29c668e4d50c048d141b (patch)
treed7e238caf2f7a4b18b3036ea33b5a0b95d9b2e10 /src/mongo/bson/util
parentdee1c5c4bf9d15d8ee7138130ad097a4ee7e523b (diff)
downloadmongo-fe72cc35ff8af7bf421d29c668e4d50c048d141b.tar.gz
SERVER-30580 Always use errorString() when streaming an ErrorCode::Error
Diffstat (limited to 'src/mongo/bson/util')
-rw-r--r--src/mongo/bson/util/builder.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/bson/util/builder.h b/src/mongo/bson/util/builder.h
index abd4dd95f90..9d4ad89d1a0 100644
--- a/src/mongo/bson/util/builder.h
+++ b/src/mongo/bson/util/builder.h
@@ -443,6 +443,10 @@ public:
append(typeName(type));
return *this;
}
+ StringBuilderImpl& operator<<(ErrorCodes::Error code) {
+ append(ErrorCodes::errorString(code));
+ return *this;
+ }
void appendDoubleNice(double x) {
const int prev = _buf.l;