60 std::
string m_hostname;
80 const
char *
what() const throw()
override
82 if (m_state == kFirst) {
87 if (m_state == kDone) {
88 return m_formatted.c_str();
95 std::string
getWhat()
const throw() override;
104 mutable EState m_state;
105 mutable std::string m_formatted;
124 const
char *
what() const throw()
override
126 if (m_state == kFirst) {
131 if (m_state == kDone) {
132 return m_formatted.c_str();
145 mutable EState m_state;
146 mutable std::string m_formatted;
157 std::string
getWhat()
const throw()
override;
169 std::string
getWhat()
const throw()
override;
180 std::string
getWhat()
const throw()
override;
191 std::string
getWhat()
const throw()
override;
BaseException()
Use getWhat() as the result of what().
Definition BaseException.cpp:18
virtual std::string getWhat() const noexcept
Get a human readable string describing the exception.
Definition BaseException.h:32
const char * what() const override
Reason for exception.
Definition BaseException.cpp:28
The IOCloseException - Thrown if a stream cannot be closed.
Definition IOException.h:25
std::string getWhat() const override
Get a human readable string describing the exception.
Definition SocketException.cpp:39
SocketAddressException(SocketError, const std::string &hostname, int port) noexcept
Definition SocketException.cpp:16
SocketError
Failure codes.
Definition SocketException.h:31
@ NotFound
The hostname is unknown.
Definition SocketException.h:33
@ Unknown
Unknown error.
Definition SocketException.h:32
@ BadPort
The port is invalid.
Definition SocketException.h:36
@ Unsupported
The hostname is valid but has no supported address.
Definition SocketException.h:35
@ NoAddress
The hostname is valid but has no IP address.
Definition SocketException.h:34
SocketError getError() const noexcept
Get the error code.
Definition SocketException.cpp:24
int getPort() const noexcept
Get the port.
Definition SocketException.cpp:34
std::string getHostname() const noexcept
Get the hostname.
Definition SocketException.cpp:29
~SocketAddressException() override=default
SocketAddressInUseException Thrown when a socket cannot be bound to an address because the address is...
Definition SocketException.h:165
std::string getWhat() const override
Get a human readable string describing the exception.
Definition SocketException.cpp:78
SocketBindException - Thrown when a socket cannot be bound to an address.
Definition SocketException.h:153
std::string getWhat() const override
Get a human readable string describing the exception.
Definition SocketException.cpp:69
SocketConnectException - Thrown when a socket cannot connect to a remote endpoint.
Definition SocketException.h:176
std::string getWhat() const override
Get a human readable string describing the exception.
Definition SocketException.cpp:87
SocketCreateException - Thrown when a socket cannot be created (by the operating system).
Definition SocketException.h:187
std::string getWhat() const override
Get a human readable string describing the exception.
Definition SocketException.cpp:96
SocketException generic socket exception.
Definition SocketException.h:18
~SocketIOCloseException() override=default
SocketIOCloseException()
Definition SocketException.h:70
const char * what() const override
Definition SocketException.h:80
SocketIOCloseException(const std::string &msg)
Definition SocketException.h:74
SocketWithWhatException()
Definition SocketException.h:114
SocketWithWhatException(const std::string &msg)
Definition SocketException.h:118
~SocketWithWhatException() override=default
const char * what() const override
Definition SocketException.h:124