0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

move object creation for mongo_insert into try/catch

This commit is contained in:
Eliot Horowitz 2011-01-19 23:17:13 -05:00
parent f8754e701e
commit f964db5b9e

View File

@ -303,11 +303,11 @@ namespace mongo {
uassert( 10248 , "no connection!" , conn );
string ns = c.toString( argv[0] );
BSONObj o = c.toObject( argv[1] );
// TODO: add _id
try {
BSONObj o = c.toObject( argv[1] );
// TODO: add _id
conn->insert( ns , o );
return JS_TRUE;
}