25#ifndef JOIN_CORE_ERROR_HPP
26#define JOIN_CORE_ERROR_HPP
29#include <system_error>
34 extern thread_local std::error_code
lastError;
89 virtual const
char*
name () const noexcept override;
96 virtual
std::
string message (
int code) const noexcept override;
104 virtual
bool equivalent (const
std::error_code& code,
int condition) const noexcept override;
112 virtual
bool equivalent (
int code, const
std::error_condition& condition) const noexcept override;
139 struct is_error_condition_enum<
join::
Errc> :
public true_type
Error category.
Definition error.hpp:60
virtual std::string message(int code) const noexcept override
Translate error code to human readable error string.
Definition error.cpp:47
constexpr ErrorCategory() noexcept=default
Create instance.
virtual bool equivalent(const std::error_code &code, int condition) const noexcept override
find equivalent from Errc to system error code.
Definition error.cpp:86
virtual const char * name() const noexcept override
Get error category name.
Definition error.cpp:38
Definition acceptor.hpp:32
Errc
Generic error codes.
Definition error.hpp:40
const std::error_category & getErrorCategory() noexcept
Get error category.
Definition error.cpp:140
std::error_code make_error_code(join::Errc code) noexcept
Create an std::error_code object.
Definition error.cpp:150
thread_local std::error_code lastError
last error.
Definition error.cpp:32
std::error_condition make_error_condition(join::Errc code) noexcept
Create an std::error_condition object.
Definition error.cpp:159