MCPcopy Create free account
hub / github.com/NVIDIA/stdexec / store_error

Method store_error

include/exec/sequence/merge_each.hpp:199–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197 template <class _Error>
198 requires(!__std::same_as<_Error, _ErrorStorage>)
199 void store_error(_Error&& __error)
200 noexcept(__nothrow_callable<decltype(&_ErrorStorage::template emplace<_Error>),
201 _ErrorStorage&,
202 _Error>)
203 {
204 if (this->nested_value_fail())
205 {
206 // We are the first child to complete with an error, so we must save the error. (Any
207 // subsequent errors are ignored.)
208 if constexpr (noexcept(__error_storage_->template emplace<_Error>(
209 static_cast<_Error&&>(__error))))
210 {
211 __error_storage_->template emplace<_Error>(static_cast<_Error&&>(__error));
212 }
213 else
214 {
215 STDEXEC_TRY
216 {
217 __error_storage_->template emplace<_Error>(static_cast<_Error&&>(__error));
218 }
219 STDEXEC_CATCH_ALL
220 {
221 __error_storage_->template emplace<std::exception_ptr>(std::current_exception());
222 }
223 }
224 }
225 }
226 };

Callers 3

set_errorMethod · 0.80
set_errorMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected