summaryrefslogtreecommitdiff
path: root/src/mongo/db/ops
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2014-03-06 15:20:22 -0500
committerMathias Stearn <mathias@10gen.com>2014-03-06 15:48:37 -0500
commit8171071440b1944429056f4df4f32f135648a177 (patch)
treef55dd32cb0614f3a6aa1a6630f6f95fc6dc00b84 /src/mongo/db/ops
parent0b575dc0ba7a71d22bc4661d76f857d7be8a22ec (diff)
downloadmongo-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.cpp3
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;