Operators that help to recover from error notifications from an Observable.
More...
|
template<typename Selector>
requires rpp::constraint::observable<std::invoke_result_t<Selector, std::exception_ptr>> |
auto | rpp::operators::on_error_resume_next (Selector &&selector) |
| If an error occurs, take the result from the Selector and subscribe to that instead.
|
|
auto | rpp::operators::retry (size_t count) |
| The retry operator attempts to resubscribe to the observable when an error occurs, up to the specified number of retries.
|
|
auto | rpp::operators::retry () |
| The infinite retry operator continuously attempts to resubscribe to the observable upon error, without a retry limit.
|
|
Operators that help to recover from error notifications from an Observable.
- See also
- https://reactivex.io/documentation/operators.html#error
◆ on_error_resume_next()
auto rpp::operators::on_error_resume_next |
( |
Selector && | selector | ) |
|
◆ retry() [1/2]
auto rpp::operators::retry |
( |
| ) |
|
|
inline |
◆ retry() [2/2]
auto rpp::operators::retry |
( |
size_t | count | ) |
|
|
inline |
The retry operator attempts to resubscribe to the observable when an error occurs, up to the specified number of retries.
- Parameters
-
count | is the number of retries |
- Note
#include <rpp/operators/retry.hpp>
- Examples:
[](const std::exception_ptr&) { std::cout << "error" << std::endl; },
[]() { std::cout << "completed" << std::endl; });
- See also
- https://reactivex.io/documentation/operators/retry.html