Skip to content
Browse files

Catch DBException separate from std::exception SERVER-4137

  • Loading branch information...
1 parent 3733a98 commit 617e9ff8ec1ecd134c7e6e42c85983ff8873a30d @RedBeard0531 RedBeard0531 committed
Showing with 4 additions and 0 deletions.
  1. +4 −0 util/net/message_server_port.cpp
View
4 util/net/message_server_port.cpp
@@ -90,6 +90,10 @@ namespace mongo {
log() << "ClockSkewException - shutting down" << endl;
exitCleanly( EXIT_CLOCK_SKEW );
}
+ catch ( const DBException& e ) { // must be right above std::exception to avoid catching subclasses
+ log() << "DBException handling request, closing client connection: " << e << endl;
+ p->shutdown();
+ }
catch ( std::exception &e ) {
error() << "Uncaught std::exception: " << e.what() << ", terminating" << endl;
dbexit( EXIT_UNCAUGHT );

0 comments on commit 617e9ff

Please sign in to comment.
Something went wrong with that request. Please try again.