58 QString
getWhat() const throw() override;
62 std::
string m_hostname;
82 const
char *
what() const throw()
override
84 if (m_state == kFirst) {
86 m_formatted =
getWhat().toLocal8Bit();
89 if (m_state == kDone) {
90 return m_formatted.constData();
97 QString
getWhat()
const throw() override;
106 mutable EState m_state;
107 mutable QByteArray m_formatted;
126 const
char *
what() const throw()
override
128 if (m_state == kFirst) {
130 m_formatted =
getWhat().toLocal8Bit();
133 if (m_state == kDone) {
134 return m_formatted.constData();
147 mutable EState m_state;
148 mutable QByteArray m_formatted;
159 QString
getWhat()
const throw()
override;
171 QString
getWhat()
const throw()
override;
182 QString
getWhat()
const throw()
override;
193 QString
getWhat()
const throw()
override;
virtual QString getWhat() const noexcept
Get a human readable string describing the exception.
Definition BaseException.h:35
BaseException()
Use getWhat() as the result of what().
Definition BaseException.cpp:18
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
SocketAddressException(SocketError, const std::string &hostname, int port) noexcept
Definition SocketException.cpp:16
SocketError
Failure codes.
Definition SocketException.h:33
@ NotFound
The hostname is unknown.
Definition SocketException.h:35
@ Unknown
Unknown error.
Definition SocketException.h:34
@ BadPort
The port is invalid.
Definition SocketException.h:38
@ Unsupported
The hostname is valid but has no supported address.
Definition SocketException.h:37
@ NoAddress
The hostname is valid but has no IP address.
Definition SocketException.h:36
QString getWhat() const override
Get a human readable string describing the exception.
Definition SocketException.cpp:39
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:167
QString 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:155
QString 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:178
QString 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:189
QString getWhat() const override
Get a human readable string describing the exception.
Definition SocketException.cpp:96
SocketException generic socket exception.
Definition SocketException.h:20
SocketIOCloseException(const QString &msg)
Definition SocketException.h:76
~SocketIOCloseException() override=default
SocketIOCloseException()
Definition SocketException.h:72
const char * what() const override
Definition SocketException.h:82
SocketWithWhatException(const QString &msg)
Definition SocketException.h:120
SocketWithWhatException()
Definition SocketException.h:116
~SocketWithWhatException() override=default
const char * what() const override
Definition SocketException.h:126