join 1.0
lightweight network framework library
Loading...
Searching...
No Matches
join::ErrorCategory Class Reference

Error category. More...

#include <error.hpp>

Inheritance diagram for join::ErrorCategory:
Collaboration diagram for join::ErrorCategory:

Public Member Functions

constexpr ErrorCategory () noexcept=default
 Create instance.
 
 ErrorCategory (const ErrorCategory &)=delete
 copy constructor.
 
ErrorCategoryoperator= (const ErrorCategory &)=delete
 copy assignment operator.
 
virtual ~ErrorCategory ()=default
 Destoy instance.
 
virtual const char * name () const noexcept override
 Get error category name.
 
virtual std::string message (int code) const noexcept override
 Translate error code to human readable error string.
 
virtual bool equivalent (const std::error_code &code, int condition) const noexcept override
 find equivalent from Errc to system error code.
 
virtual bool equivalent (int code, const std::error_condition &condition) const noexcept override
 find equivalent from Errc to system error code.
 

Detailed Description

Error category.

Constructor & Destructor Documentation

◆ ErrorCategory() [1/2]

join::ErrorCategory::ErrorCategory ( )
constexprdefaultnoexcept

Create instance.

◆ ErrorCategory() [2/2]

join::ErrorCategory::ErrorCategory ( const ErrorCategory & )
delete

copy constructor.

Parameters
otherother object to copy.

◆ ~ErrorCategory()

virtual join::ErrorCategory::~ErrorCategory ( )
virtualdefault

Destoy instance.

Member Function Documentation

◆ equivalent() [1/2]

bool ErrorCategory::equivalent ( const std::error_code & code,
int condition ) const
overridevirtualnoexcept

find equivalent from Errc to system error code.

Parameters
codeSystem error code.
conditionErrc.
Returns
true if equivalent, false otherwise.

◆ equivalent() [2/2]

bool ErrorCategory::equivalent ( int code,
const std::error_condition & condition ) const
overridevirtualnoexcept

find equivalent from Errc to system error code.

Parameters
codeSystem error code.
conditionerror condition.
Returns
true if equivalent, false otherwise.

◆ message()

std::string ErrorCategory::message ( int code) const
overridevirtualnoexcept

Translate error code to human readable error string.

Parameters
codeerror code.
Returns
Human readable error string.

◆ name()

const char * ErrorCategory::name ( ) const
overridevirtualnoexcept

Get error category name.

Returns
Error category name.

◆ operator=()

ErrorCategory & join::ErrorCategory::operator= ( const ErrorCategory & )
delete

copy assignment operator.

Parameters
otherother object to copy.
Returns
this.

The documentation for this class was generated from the following files: