docs: update code-style rule 2.24

This commit also updates existing code to use the new format.

refs #4681

Change-Id: I88e62a34fc55a69cd01d74e80a7000c6cf4d7c2d
diff --git a/src/net/dns.hpp b/src/net/dns.hpp
index 961e5bd..9357613 100644
--- a/src/net/dns.hpp
+++ b/src/net/dns.hpp
@@ -60,13 +60,10 @@
   }
 };
 
-struct Error : public std::runtime_error
+class Error : public std::runtime_error
 {
-  explicit
-  Error(const std::string& what)
-    : std::runtime_error(what)
-  {
-  }
+public:
+  using std::runtime_error::runtime_error;
 };
 
 typedef function<void (const IpAddress& address)> SuccessCallback;