Permalink
Browse files

better error handling in loading system.js.

  • Loading branch information...
1 parent d0882e2 commit 0c54e46abedd712353f43671506ca7ae427b6857 @erh erh committed Apr 11, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 scripting/engine.cpp
View
@@ -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 );

0 comments on commit 0c54e46

Please sign in to comment.