diff options
Diffstat (limited to 'shell/mongo_vstudio.cpp')
-rw-r--r-- | shell/mongo_vstudio.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/shell/mongo_vstudio.cpp b/shell/mongo_vstudio.cpp index cfed6186a10..0f56c4184ed 100644 --- a/shell/mongo_vstudio.cpp +++ b/shell/mongo_vstudio.cpp @@ -1517,7 +1517,10 @@ const StringData _jscode_raw_db = "var c = {};\n" "c[name] = 1;\n" "c.help = true;\n" -"return this.runCommand( c ).help;\n" +"var res = this.runCommand( c );\n" +"if ( ! res.ok )\n" +"throw res.errmsg;\n" +"return res.help;\n" "}\n" "\n" "DB.prototype.runCommand = function( obj ){\n" |