better error handling in loading system.js.

This commit is contained in:
Eliot Horowitz
2011-04-11 14:22:12 -04:00
parent 5ad8d4b8ff
commit fbbd3785a8

View File

@@ -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 );