sockpp
Modern C++ socket library wrapper
|
Errors from getaddrinfo. More...
#include <exception.h>
Public Member Functions | |
getaddrinfo_error (int err, const std::string &hostname) | |
Constructs an error with the specified getaddrinfo error code. More... | |
int | error () const |
Get the error number. More... | |
const std::string & | hostname () const |
Get the hostname that triggered the error. More... | |
Errors from getaddrinfo.
These are errors relating to DNS lookup, returned from the getaddrinfo system call. Their codes are declared in <netdb.h>.
sockpp::getaddrinfo_error::getaddrinfo_error | ( | int | err, |
const std::string & | hostname | ||
) |
Constructs an error with the specified getaddrinfo error code.
err | The error number, as returned by getaddrinfo. |
hostname | The DNS name being resolved that triggered the error. |
|
inline |
Get the error number.
|
inline |
Get the hostname that triggered the error.