Fix SignalHandlerTest with ASAN
[folly.git] / folly / IPAddressException.h
index c2ca1ad428f67aa5d8daf54a70ba59c8211a8223..d1830ba61737ea56cdb5b8b1fdbd25e4525bc29b 100644 (file)
 
 namespace folly {
 
+/**
+ * Error codes for non-throwing interface of IPAddress family of functions.
+ */
+enum class IPAddressFormatError { INVALID_IP, UNSUPPORTED_ADDR_FAMILY };
+
 /**
  * Exception for invalid IP addresses.
  */
@@ -37,8 +42,8 @@ class IPAddressFormatException : public std::exception {
       default;
   IPAddressFormatException& operator=(IPAddressFormatException&&) = default;
 
-  virtual ~IPAddressFormatException() noexcept {}
-  virtual const char *what(void) const noexcept {
+  ~IPAddressFormatException() noexcept override {}
+  const char* what() const noexcept override {
     return msg_.c_str();
   }
 
@@ -62,4 +67,4 @@ class InvalidAddressFamilyException : public IPAddressFormatException {
       default;
 };
 
-}  // folly
+} // namespace folly