diff options
author | Jonathan Ma <jonathan.ma@mongodb.com> | 2019-01-04 14:01:11 -0500 |
---|---|---|
committer | Jason Carey <jcarey@argv.me> | 2019-03-13 19:10:51 -0400 |
commit | e77f1b2475391d2031ee1c8416121c1a40502caa (patch) | |
tree | 22ebeee40f7954dfb053b913c27067b0d210561b | |
parent | 79678803c2ba59777008156873d1d78108adf7b8 (diff) | |
download | mongo-e77f1b2475391d2031ee1c8416121c1a40502caa.tar.gz |
SERVER-35138 service_state_machine will log backtrace for uncaught exceptions
(cherry picked from commit ae66e32d6d4f22e8958d5e0b8aa47a2602ce1210)
-rw-r--r-- | src/mongo/transport/service_state_machine.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mongo/transport/service_state_machine.cpp b/src/mongo/transport/service_state_machine.cpp index ff583a538cf..1aed664aecf 100644 --- a/src/mongo/transport/service_state_machine.cpp +++ b/src/mongo/transport/service_state_machine.cpp @@ -450,12 +450,10 @@ void ServiceStateMachine::_runNextInGuard(ThreadGuard guard) { return; } catch (const DBException& e) { - // must be right above std::exception to avoid catching subclasses log() << "DBException handling request, closing client connection: " << redact(e); - } catch (const std::exception& e) { - error() << "Uncaught std::exception: " << e.what() << ", terminating"; - quickExit(EXIT_UNCAUGHT); } + // No need to catch std::exception, as std::terminate will be called when the exception bubbles + // to the top of the stack if (!guard) { guard = ThreadGuard(this); |