summaryrefslogtreecommitdiff
path: root/src/mongo/util/net/socket_exception.h
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2017-10-16 18:59:08 -0400
committerMathias Stearn <mathias@10gen.com>2017-11-02 14:25:21 -0400
commita0ebc55db521792632fb3ece87edafec327cc2a9 (patch)
treeb2098c89f241082a9c1a55ed69794eef210aa312 /src/mongo/util/net/socket_exception.h
parent9f8696b5ba4c9310749c5c3f1ee082c5f663b5b0 (diff)
downloadmongo-a0ebc55db521792632fb3ece87edafec327cc2a9.tar.gz
SERVER-31622 Fix bad throws
Diffstat (limited to 'src/mongo/util/net/socket_exception.h')
-rw-r--r--src/mongo/util/net/socket_exception.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/util/net/socket_exception.h b/src/mongo/util/net/socket_exception.h
index b610e754bb3..e6e5ac25c2d 100644
--- a/src/mongo/util/net/socket_exception.h
+++ b/src/mongo/util/net/socket_exception.h
@@ -37,7 +37,7 @@ namespace mongo {
/**
* A special class of DBException thrown by Sockets.
*/
-class SocketException : public DBException {
+class SocketException final : public DBException {
public:
const enum Type {
CLOSED,
@@ -61,6 +61,8 @@ public:
std::string toString() const override;
private:
+ void defineOnlyInFinalSubclassToPreventSlicing() final {}
+
std::string _server;
std::string _extra;
};