|
Net++
A class-based C++ encapsulation over the POSIX Sockets API
|
Enumerations | |
| enum | LibraryError { BindFailed , ConnectFailed , MissingAsyncContext } |
| Enumeration representing the different error codes handled by LibraryErrorCategory. More... | |
Functions | |
| void | throw_system_error (std::string what_arg) |
| Throws an exception with std::generic category() | |
| void | log_error (std::system_error &e) |
| Prints the error to stdout. | |
| void | throw_gai_error (int &ev, std::string what_arg) |
| Throws an exception with gai_error category. | |
| void | throw_library_error (LibraryError code, std::string what_arg) |
| Throws an exception with library_error category. | |
| void netpp_error::log_error | ( | std::system_error & | e | ) |
Prints the error to stdout.
| e | The system error thrown |
| void netpp_error::throw_gai_error | ( | int & | ev, |
| std::string | what_arg | ||
| ) |
Throws an exception with gai_error category.
| ev | The resulting error code from a getaddrinfo() call |
| what_arg | The explanation of the error |
| void netpp_error::throw_library_error | ( | LibraryError | code, |
| std::string | what_arg | ||
| ) |
Throws an exception with library_error category.
| code | The error code pertaining to the library error |
| what_arg | The explanation of the error |
| void netpp_error::throw_system_error | ( | std::string | what_arg | ) |
Throws an exception with std::generic category()
Constructs a system error with errno, std::generic_category, and the passed what_arg, and throws the error
| what_arg | An explanatory string passed as a substring to the exception's what() |