|
ThreadSchedule 3.0.0
Modern C++ thread management library
|
Captured information about a task failure. More...
#include <task_error.hpp>
Public Member Functions | |
| auto | what () const -> std::string |
| Return a printable error message if exception derives from std::exception. | |
| void | rethrow () const |
| Rethrow captured exception if present. | |
Static Public Member Functions | |
| static auto | capture (std::string description={}) -> task_error |
| Capture failure context for the current exception state. | |
Public Attributes | |
| std::exception_ptr | exception |
| Original exception object captured from the task. | |
| std::string | task_description |
| Optional textual description of the failing task. | |
| std::thread::id | std_id |
| std::thread id where the failure occurred. | |
| std::chrono::steady_clock::time_point | timestamp |
Capture timestamp using steady_clock. | |
Captured information about a task failure.
Definition at line 21 of file task_error.hpp.
|
inlinestatic |
Capture failure context for the current exception state.
| description | Optional task description string. |
Definition at line 37 of file task_error.hpp.
Referenced by threadschedule::advanced::error_handled_task< Func >::operator()(), threadschedule::thread_pool::post(), and threadschedule::thread_pool::submit().
|
inline |
Rethrow captured exception if present.
Definition at line 70 of file task_error.hpp.
References exception.
|
inline |
Return a printable error message if exception derives from std::exception.
Definition at line 48 of file task_error.hpp.
References exception.
| std::exception_ptr threadschedule::task_error::exception |
Original exception object captured from the task.
Definition at line 24 of file task_error.hpp.
| std::thread::id threadschedule::task_error::std_id |
std::thread id where the failure occurred.
Definition at line 28 of file task_error.hpp.
| std::string threadschedule::task_error::task_description |
Optional textual description of the failing task.
Definition at line 26 of file task_error.hpp.
| std::chrono::steady_clock::time_point threadschedule::task_error::timestamp |
Capture timestamp using steady_clock.
Definition at line 30 of file task_error.hpp.