mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-30 00:56:44 +01:00
fix shutdownServer in shell to show returend error msg
This commit is contained in:
parent
c919b7feec
commit
7c5992dbea
@ -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 ) );
|
||||
|
Loading…
Reference in New Issue
Block a user