|
Thread System 0.3.1
High-performance C++20 thread pool with work stealing and DAG scheduling
|
Represents an error in the thread system. More...
#include <error_handling.h>

Public Member Functions | |
| error (error_code code, std::string message={}) | |
| Constructs an error with a code and optional message. | |
| error_code | code () const noexcept |
| Gets the error code. | |
| const std::string & | message () const noexcept |
| Gets the error message. | |
| std::string | to_string () const |
| Converts the error to a string representation. | |
| operator std::string () const | |
| Implicit conversion to string. | |
Private Attributes | |
| error_code | code_ |
| std::string | message_ |
Represents an error in the thread system.
This class encapsulates an error code and an optional message.
Definition at line 132 of file error_handling.h.
|
inlineexplicit |
Constructs an error with a code and optional message.
| code | The error code |
| message | Optional detailed message about the error |
Definition at line 139 of file error_handling.h.
|
inlinenodiscardnoexcept |
Gets the error code.
Definition at line 146 of file error_handling.h.
References code_.
Referenced by kcenon::thread::thread_logger::log_error().

|
inlinenodiscardnoexcept |
Gets the error message.
Definition at line 152 of file error_handling.h.
References message_.
Referenced by kcenon::thread::typed_thread_pool_builder< job_type >::build(), and kcenon::thread::thread_logger::log_error().

|
inline |
Implicit conversion to string.
Definition at line 168 of file error_handling.h.
References to_string().

|
inlinenodiscard |
Converts the error to a string representation.
Definition at line 158 of file error_handling.h.
References code_, kcenon::thread::error_code_to_string(), and message_.
Referenced by operator std::string(), kcenon::thread::result_to_optional_error(), kcenon::thread::result_to_pair(), kcenon::thread::result< T >::value_or_throw(), kcenon::thread::result< T >::value_or_throw(), and kcenon::thread::result< void >::value_or_throw().


|
private |
Definition at line 173 of file error_handling.h.
Referenced by code(), and to_string().
|
private |
Definition at line 174 of file error_handling.h.
Referenced by message(), and to_string().