diff options
author | Eliot Horowitz <eliot@10gen.com> | 2011-02-18 10:49:31 -0500 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2011-02-18 10:49:31 -0500 |
commit | 51b77743b10f45570aac539309fc4986dc2002de (patch) | |
tree | eed35e3050cc5591152d4c47266ed5099b1f1d86 | |
parent | 95694121cc34fc0f2d144ceb9f6f5e6b05ed0d8e (diff) | |
download | mongo-51b77743b10f45570aac539309fc4986dc2002de.tar.gz |
nicer error message when shard goes away SERVER-2543
-rw-r--r-- | s/shardconnection.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/s/shardconnection.cpp b/s/shardconnection.cpp index 78f77bc8962..d05f5b17e75 100644 --- a/s/shardconnection.cpp +++ b/s/shardconnection.cpp @@ -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; } } |