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:
parent
f8754e701e
commit
f964db5b9e
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user