diff options
author | Mathias Stearn <mathias@10gen.com> | 2017-08-29 12:02:17 -0400 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2017-08-29 19:05:08 -0400 |
commit | 3eab8637adc3f17f10de0d9229445d6214e5f01e (patch) | |
tree | 664585ef9ba968c7e9b798fdb6497c47c486bbf6 /src | |
parent | 67f72740b1b93fb797d49397b207a03ec15afd5e (diff) | |
download | mongo-3eab8637adc3f17f10de0d9229445d6214e5f01e.tar.gz |
SERVER-30874 Don't ignore errors in scope guard / ON_BLOCK_EXIT
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/util/net/op_msg_integration_test.cpp | 14 | ||||
-rw-r--r-- | src/mongo/util/scopeguard.h | 3 |
2 files changed, 8 insertions, 9 deletions
diff --git a/src/mongo/util/net/op_msg_integration_test.cpp b/src/mongo/util/net/op_msg_integration_test.cpp index 8da36c20902..a7f730ed7e8 100644 --- a/src/mongo/util/net/op_msg_integration_test.cpp +++ b/src/mongo/util/net/op_msg_integration_test.cpp @@ -139,19 +139,15 @@ TEST(OpMsg, CloseConnectionOnFireAndForgetNotMasterError) { output)) << output; ON_BLOCK_EXIT([&] { - try { - uassertStatusOK(conn.connect(host, "integration_test-cleanup")); - ASSERT(conn.runCommand("admin", - fromjson(R"({ + uassertStatusOK(conn.connect(host, "integration_test-cleanup")); + ASSERT(conn.runCommand("admin", + fromjson(R"({ configureFailPoint: 'skipCheckingForNotMasterInCommandDispatch', mode: 'off' })"), - output)) - << output; - } catch (...) { - std::terminate(); - } + output)) + << output; }); diff --git a/src/mongo/util/scopeguard.h b/src/mongo/util/scopeguard.h index 167db24c9b5..a5701f6347c 100644 --- a/src/mongo/util/scopeguard.h +++ b/src/mongo/util/scopeguard.h @@ -15,6 +15,8 @@ #ifndef LOKI_SCOPEGUARD_H_ #define LOKI_SCOPEGUARD_H_ +#include <exception> + #include "mongo/platform/compiler.h" namespace mongo { @@ -98,6 +100,7 @@ protected: try { j.Execute(); } catch (...) { + std::terminate(); } } |