summaryrefslogtreecommitdiff
path: root/src/mongo/util/net/socket_exception.h
diff options
context:
space:
mode:
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;
};