diff options
author | Eliot Horowitz <eliot@10gen.com> | 2011-01-19 23:17:13 -0500 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2011-01-19 23:18:15 -0500 |
commit | f964db5b9e282a733fc2629d4fa96a513ac828c8 (patch) | |
tree | e5c90faa38378c45d3fd62af293eef8b7af03caa /scripting/sm_db.cpp | |
parent | f8754e701e2d736835db619362b24f394ec7a955 (diff) | |
download | mongo-f964db5b9e282a733fc2629d4fa96a513ac828c8.tar.gz |
move object creation for mongo_insert into try/catch
Diffstat (limited to 'scripting/sm_db.cpp')
-rw-r--r-- | scripting/sm_db.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripting/sm_db.cpp b/scripting/sm_db.cpp index 0b144283f49..22096e98068 100644 --- a/scripting/sm_db.cpp +++ b/scripting/sm_db.cpp @@ -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; } |