summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2011-01-21 15:48:47 -0500
committerEliot Horowitz <eliot@10gen.com>2011-01-21 15:48:47 -0500
commit3419f550a0d58a04f505374c2027f7348cdbbb9c (patch)
tree37c280bda38f3efa6f5f2a009bf1a1f4bbe48dcc
parentb331e1c7aed7d85dd14f86e1396f5c091aaa3f0f (diff)
downloadmongo-3419f550a0d58a04f505374c2027f7348cdbbb9c.tar.gz
better remove error reporting for js
-rw-r--r--scripting/sm_db.cpp5
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;