summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDwight <dmerriman@gmail.com>2009-11-30 11:18:41 -0500
committerDwight <dmerriman@gmail.com>2009-11-30 11:18:41 -0500
commit7c5992dbead773a896bfa44a3e1cad37367aeee4 (patch)
tree39b211a1e62a7f640125c52b5d7a3322592db57b
parentc919b7feecff8a28d5bd0217d6c26afcb536f33c (diff)
downloadmongo-7c5992dbead773a896bfa44a3e1cad37367aeee4.tar.gz
fix shutdownServer in shell to show returend error msg
-rw-r--r--shell/db.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/shell/db.js b/shell/db.js
index 841d2f0d3db..c101ea5c5e5 100644
--- a/shell/db.js
+++ b/shell/db.js
@@ -139,8 +139,10 @@ DB.prototype.shutdownServer = function() {
}
try {
- this._dbCommand("shutdown");
- throw "shutdownServer failed";
+ var res = this._dbCommand("shutdown");
+ if( res )
+ throw "shutdownServer failed: " + res.errmsg;
+ throw "shutdownServer failed";
}
catch ( e ){
assert( tojson( e ).indexOf( "error doing query: failed" ) >= 0 , "unexpected error: " + tojson( e ) );