56 QString
getWhat() const throw() override;
60 std::
string m_hostname;
80 const
char *
what() const throw()
override
82 if (m_state == kFirst) {
87 if (m_state == kDone) {
88 return qPrintable(m_formatted);
95 QString
getWhat()
const throw() override;
104 mutable EState m_state;
105 mutable QString m_formatted;
124 const
char *
what() const throw()
override
126 if (m_state == kFirst) {
131 if (m_state == kDone) {
132 return qPrintable(m_formatted);
145 mutable EState m_state;
146 mutable QString m_formatted;
157 QString
getWhat()
const throw()
override;
169 QString
getWhat()
const throw()
override;
180 QString
getWhat()
const throw()
override;
191 QString
getWhat()
const throw()
override;
virtual QString getWhat() const noexcept
Get a human readable string describing the exception.
Definition BaseException.h:34
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: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
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:165
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:153
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:176
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:187
QString getWhat() const override
Get a human readable string describing the exception.
Definition SocketException.cpp:96
SocketException generic socket exception.
Definition SocketException.h:18
SocketIOCloseException(const QString &msg)
Definition SocketException.h:74
~SocketIOCloseException() override=default
SocketIOCloseException()
Definition SocketException.h:70
const char * what() const override
Definition SocketException.h:80
SocketWithWhatException(const QString &msg)
Definition SocketException.h:118
SocketWithWhatException()
Definition SocketException.h:114
~SocketWithWhatException() override=default
const char * what() const override
Definition SocketException.h:124