diff options
author | Mathias Stearn <mathias@10gen.com> | 2014-03-06 15:20:22 -0500 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2014-03-06 15:48:37 -0500 |
commit | 8171071440b1944429056f4df4f32f135648a177 (patch) | |
tree | f55dd32cb0614f3a6aa1a6630f6f95fc6dc00b84 /src/mongo/db/ops | |
parent | 0b575dc0ba7a71d22bc4661d76f857d7be8a22ec (diff) | |
download | mongo-8171071440b1944429056f4df4f32f135648a177.tar.gz |
SERVER-12997 Better error message for oversized insert
Diffstat (limited to 'src/mongo/db/ops')
-rw-r--r-- | src/mongo/db/ops/insert.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/ops/insert.cpp b/src/mongo/db/ops/insert.cpp index b411e33602a..6998a6b25c7 100644 --- a/src/mongo/db/ops/insert.cpp +++ b/src/mongo/db/ops/insert.cpp @@ -40,7 +40,8 @@ namespace mongo { return StatusWith<BSONObj>( ErrorCodes::BadValue, str::stream() << "object to insert too large" - << doc.objsize() ); + << ". size in bytes: " << doc.objsize() + << ", max size: " << BSONObjMaxUserSize ); bool firstElementIsId = doc.firstElement().fieldNameStringData() == "_id"; bool hasTimestampToFix = false; |