diff options
author | Eliot Horowitz <eliot@10gen.com> | 2009-12-11 13:50:16 -0500 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2009-12-11 13:50:16 -0500 |
commit | 98d4235cd7dd7d4d3907c8307ad81cb092031dbb (patch) | |
tree | fac8fd34966095a1efb6043d80f576bc0a0a935e /db/jsobj.h | |
parent | 0d626c9e1eb7983766bac554f57ac500fcdd1b18 (diff) | |
download | mongo-98d4235cd7dd7d4d3907c8307ad81cb092031dbb.tar.gz |
better error messages
Diffstat (limited to 'db/jsobj.h')
-rw-r--r-- | db/jsobj.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/db/jsobj.h b/db/jsobj.h index 860d613f7c8..1c0b3101e8e 100644 --- a/db/jsobj.h +++ b/db/jsobj.h @@ -714,8 +714,10 @@ namespace mongo { _holder.reset( new Holder( data ) ); _objdata = data; if ( ! isValid() ){ - log() << "invalid object size: " << objsize() << endl; - massert( "Invalid BSONObj spec size" , 0 ); + stringstream ss; + ss << "Invalid BSONObj spec size: " << objsize(); + string s = ss.str(); + massert( s , 0 ); } } #pragma pack(1) |