Skip to content

Commit

Permalink
log message instead of printing stack trace when can't kill ops on sh…
Browse files Browse the repository at this point in the history
…ell shutdown
  • Loading branch information
astaple committed Mar 18, 2010
1 parent ad6e86e commit 8c69ba5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions shell/dbshell.cpp
Expand Up @@ -86,8 +86,12 @@ void killOps() {
for( map< const void*, string >::iterator i = mongo::shellUtils::_allMyUris.begin(); i != mongo::shellUtils::_allMyUris.end(); ++i )
uris.push_back( i->second );
mongo::BSONObj spec = BSON( "" << uris );
auto_ptr< mongo::Scope > scope( mongo::globalScriptEngine->newScope() );
scope->invoke( "function( x ) { killWithUris( x ); }", spec );
try {
auto_ptr< mongo::Scope > scope( mongo::globalScriptEngine->newScope() );
scope->invoke( "function( x ) { killWithUris( x ); }", spec );
} catch ( ... ) {
mongo::rawOut( "exception while cleaning up any db ops started by this shell\n" );
}
}

void quitNicely( int sig ){
Expand Down

0 comments on commit 8c69ba5

Please sign in to comment.