summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2011-04-11 14:22:12 -0400
committerEliot Horowitz <eliot@10gen.com>2011-04-11 14:23:28 -0400
commit0c54e46abedd712353f43671506ca7ae427b6857 (patch)
treec694298afdf3372f4ca7a28ddc0148a82ee1ab65
parentd0882e2ef57703200d3fa4eeedf18b91ca297384 (diff)
downloadmongo-0c54e46abedd712353f43671506ca7ae427b6857.tar.gz
better error handling in loading system.js.
-rw-r--r--scripting/engine.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripting/engine.cpp b/scripting/engine.cpp
index 60e56ae3599..f9be6392f59 100644
--- a/scripting/engine.cpp
+++ b/scripting/engine.cpp
@@ -189,12 +189,12 @@ namespace mongo {
set<string> thisTime;
while ( c->more() ) {
- BSONObj o = c->next();
+ BSONObj o = c->nextSafe();
BSONElement n = o["_id"];
BSONElement v = o["value"];
- uassert( 10209 , "name has to be a string" , n.type() == String );
+ uassert( 10209 , str::stream() << "name has to be a string: " << n , n.type() == String );
uassert( 10210 , "value has to be set" , v.type() != EOO );
setElement( n.valuestr() , v );