Spec-Zone.ru › C++

std::execution::upon_error

Defined in header <execution>
execution::sender auto 
    upon_error( execution::sender auto input,
                std::invocable</*errors-sent-by*/(input)...> function );
(since C++26)

Parameters

input - sender which once an error occurs, sends the errors to the function
function - invocable to be called with errors in case an error occurs by input sender

Return value

Returns a sender describing the task graph described by the input sender, with an added node of invoking the provided function with the errors sent by the input sender as arguments (in case of an error).

Example

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/cpp/execution/upon_error

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API