diff options
author | Dwight <dmerriman@gmail.com> | 2009-11-30 11:18:41 -0500 |
---|---|---|
committer | Dwight <dmerriman@gmail.com> | 2009-11-30 11:18:41 -0500 |
commit | 7c5992dbead773a896bfa44a3e1cad37367aeee4 (patch) | |
tree | 39b211a1e62a7f640125c52b5d7a3322592db57b | |
parent | c919b7feecff8a28d5bd0217d6c26afcb536f33c (diff) | |
download | mongo-7c5992dbead773a896bfa44a3e1cad37367aeee4.tar.gz |
fix shutdownServer in shell to show returend error msg
-rw-r--r-- | shell/db.js | 6 |
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 ) ); |