Permalink
Browse files

nicer error message when shard goes away SERVER-2543

  • Loading branch information...
erh committed Feb 18, 2011
1 parent 9569412 commit 51b77743b10f45570aac539309fc4986dc2002de
Showing with 7 additions and 2 deletions.
  1. +7 −2 s/shardconnection.cpp
View
@@ -148,12 +148,17 @@ namespace mongo {
pool.release( addr , conn );
}
else {
- log(LL_ERROR) << " couldn't unset sharding :( " << res << endl;
+ error() << "unset sharding failed : " << res << endl;
delete conn;
}
}
+ catch ( SocketException& e ) {
+ // server down or something
+ LOG(1) << "socket exception trying to unset sharding: " << e.toString() << endl;
+ delete conn;
+ }
catch ( std::exception& e ) {
- log(LL_ERROR) << "couldn't unset sharding : " << e.what() << endl;
+ error() << "couldn't unset sharding : " << e.what() << endl;
delete conn;
}
}

0 comments on commit 51b7774

Please sign in to comment.