0
0
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:
Dwight 2009-11-30 11:18:41 -05:00
parent c919b7feec
commit 7c5992dbea

View File

@ -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 ) );