25#ifndef __JOIN_ERROR_HPP__
26#define __JOIN_ERROR_HPP__
29#include <system_error>
34 extern thread_local std::error_code
lastError;
66 virtual const char*
name ()
const noexcept;
73 virtual std::string
message (
int code)
const;
81 virtual bool equivalent (
const std::error_code& code,
int condition)
const noexcept;
107 template <>
struct is_error_condition_enum <
join::Errc> :
public true_type {};
Error category.
Definition error.hpp:60
virtual std::string message(int code) const
Translate error code to human readable error string.
Definition error.cpp:47
virtual bool equivalent(const std::error_code &code, int condition) const noexcept
find equivalent from Errc to system error code.
Definition error.cpp:86
virtual const char * name() const noexcept
Get error category name.
Definition error.cpp:38
Definition acceptor.hpp:32
std::error_code make_error_code(join::Errc code)
Create an std::error_code object.
Definition error.cpp:154
Errc
Generic error codes.
Definition error.hpp:40
const std::error_category & getErrorCategory()
Get error category.
Definition error.cpp:144
thread_local std::error_code lastError
last error.
Definition error.cpp:32
std::error_condition make_error_condition(join::Errc code)
Create an std::error_condition object.
Definition error.cpp:163