diff options
author | Eliot Horowitz <eliot@10gen.com> | 2011-01-21 15:48:47 -0500 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2011-01-21 15:48:47 -0500 |
commit | 3419f550a0d58a04f505374c2027f7348cdbbb9c (patch) | |
tree | 37c280bda38f3efa6f5f2a009bf1a1f4bbe48dcc | |
parent | b331e1c7aed7d85dd14f86e1396f5c091aaa3f0f (diff) | |
download | mongo-3419f550a0d58a04f505374c2027f7348cdbbb9c.tar.gz |
better remove error reporting for js
-rw-r--r-- | scripting/sm_db.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripting/sm_db.cpp b/scripting/sm_db.cpp index 22096e98068..d7a783c7e6f 100644 --- a/scripting/sm_db.cpp +++ b/scripting/sm_db.cpp @@ -347,6 +347,11 @@ namespace mongo { conn->remove( ns , o , justOne ); return JS_TRUE; } + catch ( std::exception& e ) { + JS_ReportError( cx , e.what() ); + return JS_FALSE; + } + catch ( ... ) { JS_ReportError( cx , "error doing remove" ); return JS_FALSE; |