Chain operation execution by type.
83 {
85 throw std::runtime_error("Cannot continue chain after failed operation");
86 }
87
88 try {
89 auto result =
m_executor->template execute<OpClass, DataType, OutputType>(
m_data);
90 if (!result) {
92 record_error(
"Operation " + std::string(
typeid(OpClass).name()) +
" failed");
93 throw std::runtime_error("Operation failed in fluent chain: " + std::string(typeid(OpClass).name()));
94 }
95
96 auto next = FluentExecutor<Executor, OutputType>(
m_executor, std::move(result->data));
98 next.m_operation_history.push_back(typeid(OpClass).name());
99 return next;
100 } catch (const std::exception& e) {
103 throw;
104 }
105 }
std::shared_ptr< Executor > m_executor
std::vector< std::string > m_operation_history
void record_error(const std::string &error)