summaryrefslogtreecommitdiff
path: root/src/mongo/bson
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2017-04-12 16:33:01 -0400
committerBenety Goh <benety@mongodb.com>2017-04-17 12:06:58 -0400
commit0a51d1eb89d4a915ff3ffd9584fdfc99a633d94b (patch)
tree6f29460a68cee902da64e91f31ecfc747d33d540 /src/mongo/bson
parentd44e25dde3c61d729b8e97a2118e15ec80683c83 (diff)
downloadmongo-0a51d1eb89d4a915ff3ffd9584fdfc99a633d94b.tar.gz
SERVER-28211 UUID::parse(BSONElement) returns InvalidUUID instead of UnknownError on error
Diffstat (limited to 'src/mongo/bson')
-rw-r--r--src/mongo/bson/bsonelement.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/bson/bsonelement.h b/src/mongo/bson/bsonelement.h
index 3120907b589..2d815383b2c 100644
--- a/src/mongo/bson/bsonelement.h
+++ b/src/mongo/bson/bsonelement.h
@@ -584,7 +584,9 @@ public:
const char* data = nullptr;
if (type() == BinData && binDataType() == BinDataType::newUUID)
data = binData(len);
- uassert(00000, "uuid must be a 16-byte binary field with UUID (4) subtype", len == 16);
+ uassert(ErrorCodes::InvalidUUID,
+ "uuid must be a 16-byte binary field with UUID (4) subtype",
+ len == 16);
std::array<unsigned char, 16> result;
memcpy(&result, data, len);
return result;