34 class GAIErrorCategory :
public std::error_category {
36 const char *name() const noexcept override;
37 std::
string message(
int ev) const override;
45 class LibraryErrorCategory : public std::error_category {
47 const char *name() const noexcept override;
48 std::
string message(
int ev) const override;
void throw_gai_error(int &ev, std::string what_arg)
Throws an exception with gai_error category.
LibraryError
Enumeration representing the different error codes handled by LibraryErrorCategory.
Definition error.hpp:9
@ MissingAsyncContext
Definition error.hpp:12
@ BindFailed
Definition error.hpp:10
@ ConnectFailed
Definition error.hpp:11
void throw_library_error(LibraryError code, std::string what_arg)
Throws an exception with library_error category.
void log_error(std::system_error &e)
Prints the error to stdout.
void throw_system_error(std::string what_arg)
Throws an exception with std::generic category()