summaryrefslogtreecommitdiff
path: root/shell/db.js
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2011-01-22 00:38:52 -0500
committerEliot Horowitz <eliot@10gen.com>2011-01-22 00:38:52 -0500
commit40b3524b75c498759d91ce0b4c3ae8046db37911 (patch)
tree4d93e154b50b47afc757fd3bf7e2a4c91ff408e4 /shell/db.js
parent32198fddd90612388cad7ebb4c71493dd351fb4f (diff)
downloadmongo-40b3524b75c498759d91ce0b4c3ae8046db37911.tar.gz
commandHelp should complain if command doesn't exist SERVER-2392
Diffstat (limited to 'shell/db.js')
-rw-r--r--shell/db.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/shell/db.js b/shell/db.js
index 52f512e2554..0b95fe39c59 100644
--- a/shell/db.js
+++ b/shell/db.js
@@ -34,7 +34,10 @@ DB.prototype.commandHelp = function( name ){
var c = {};
c[name] = 1;
c.help = true;
- return this.runCommand( c ).help;
+ var res = this.runCommand( c );
+ if ( ! res.ok )
+ throw res.errmsg;
+ return res.help;
}
DB.prototype.runCommand = function( obj ){