The chain keeps its data, container and type. The operation's output metadata is merged into the chain's, and its output data is stored in the metadata under name.
294 {
295 using OutputType = typename detail::datum_data<typename OpClass::output_type>::type;
296
298 error<std::runtime_error>(
300 std::source_location::current(),
301 "Cannot continue chain after failed operation: {}",
name);
302 }
303
304 try {
306 if (!result) {
309 error<std::runtime_error>(
311 std::source_location::current(),
312 "Named operation failed in fluent chain: {}",
name);
313 }
314
317 next.m_operation_history.push_back(
name);
318 return next;
319 } catch (const std::exception& e) {
324 std::source_location::current(),
325 "Exception in named operation '{}': {}",
name, e.what());
326 }
327 }
void record_error(const std::string &err)
std::shared_ptr< Executor > m_executor
Datum< DataType > absorbed(Datum< OutputType > &&result, const std::string &key) const
The current Datum with result's metadata merged in and its data stored under key.
std::vector< std::string > m_operation_history
@ ComputeMatrix
Compute operations (Yantra - algorithms, matrices, DSP)
void error_rethrow(Component component, Context context, std::source_location location=std::source_location::current(), std::string_view additional_context="")
Catch and log an exception, then rethrow it.
@ Yantra
DSP algorithms, computational units, matrix operations, Grammar.