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;
XBase()
Use getWhat() as the result of what()
Definition XBase.cpp:17
virtual std::string getWhat() const noexcept
Get a human readable string describing the exception.
Definition XBase.h:31
const char * what() const override
Reason for exception.
Definition XBase.cpp:27
The XIOClose - Thrown if a stream cannot be closed.
Definition XIO.h:24
XSocketAddressInUse Thrown when a socket cannot be bound to an address because the address is already...
Definition XSocket.h:165
std::string getWhat() const override
Get a human readable string describing the exception.
Definition XSocket.cpp:77
XSocketAddress(SocketError, const std::string &hostname, int port) noexcept
Definition XSocket.cpp:15
SocketError getError() const noexcept
Get the error code.
Definition XSocket.cpp:23
int getPort() const noexcept
Get the port.
Definition XSocket.cpp:33
std::string getHostname() const noexcept
Get the hostname.
Definition XSocket.cpp:28
SocketError
Failure codes.
Definition XSocket.h:31
@ NotFound
The hostname is unknown.
Definition XSocket.h:33
@ Unknown
Unknown error.
Definition XSocket.h:32
@ BadPort
The port is invalid.
Definition XSocket.h:36
@ Unsupported
The hostname is valid but has no supported address.
Definition XSocket.h:35
@ NoAddress
The hostname is valid but has no IP address.
Definition XSocket.h:34
~XSocketAddress() override=default
std::string getWhat() const override
Get a human readable string describing the exception.
Definition XSocket.cpp:38
XSocketBind - Thrown when a socket cannot be bound to an address.
Definition XSocket.h:153
std::string getWhat() const override
Get a human readable string describing the exception.
Definition XSocket.cpp:68
XSocketConnect - Thrown when a socket cannot connect to a remote endpoint.
Definition XSocket.h:176
std::string getWhat() const override
Get a human readable string describing the exception.
Definition XSocket.cpp:86
XSocketConnect - Thrown when a socket cannot be created (by the operating system).
Definition XSocket.h:187
std::string getWhat() const override
Get a human readable string describing the exception.
Definition XSocket.cpp:95
~XSocketIOClose() override=default
XSocketIOClose()
Definition XSocket.h:70
const char * what() const override
Definition XSocket.h:80
XSocketIOClose(const std::string &msg)
Definition XSocket.h:74
XSocketWithWhat(const std::string &msg)
Definition XSocket.h:118
XSocketWithWhat()
Definition XSocket.h:114
const char * what() const override
Definition XSocket.h:124
~XSocketWithWhat() override=default
XSocket generic socket exception.
Definition XSocket.h:18