|
| constexpr | catch_failure_with_policy_task (Task &&stored_task, Policy &&stored_policy) noexcept(std::is_nothrow_move_constructible_v< Task > &&std::is_nothrow_move_constructible_v< Policy >) |
| |
| constexpr | catch_failure_with_policy_task (const Task &stored_task, const Policy &stored_policy) noexcept(std::is_nothrow_copy_constructible_v< Task > &&std::is_nothrow_copy_constructible_v< Policy >) |
| |
template<typename Ctx , typename Prev >
requires catch_policy_compatible_task<Task, Policy, Ctx, Prev> |
| constexpr auto | invoke_raw (exec_context< Ctx, Prev > &ec) noexcept |
| | Executes the wrapped task and delegates exception handling to the stored fallback policy.
|
| |
template<typename Ctx , typename Prev , typename U = Task>
requires catch_policy_compatible_direct_output_task<U, Policy, Ctx, Prev> |
| constexpr step_result | invoke_into (exec_context< Ctx, Prev > &ec, direct_out< detail::declared_task_output_t< U > > out) noexcept |
| |
template<typename Task, typename Policy>
struct yorch::catch_failure_with_policy_task< Task, Policy >
Exception-catching adapter for tasks with a user-supplied fallback policy.
The policy must be noexcept and support a captured exception either by value (std::exception_ptr) or by const lvalue reference (const std::exception_ptr&), allowing the wrapper to present a noexcept invoke_raw(...) surface to the executor while still giving users control over failure-path raw results.
- Template Parameters
-
| Task | Stored task type. |
| Policy | Stored fallback policy type. |
Definition at line 91 of file catch_as_failure.hpp.
template<typename Task , typename Policy >
template<typename Ctx , typename Prev >
requires catch_policy_compatible_task<Task, Policy, Ctx, Prev>
Executes the wrapped task and delegates exception handling to the stored fallback policy.
- Template Parameters
-
| Ctx | Context schema. |
| Prev | Direct-parent slot view type. |
- Parameters
-
| ec | Borrowed execution context. |
- Returns
- The wrapped task's raw result on success, or the policy-produced raw result on exception.
Definition at line 122 of file catch_as_failure.hpp.