I have constructed a tbb::flow::graph
that consists of several function_node
objects. During execution I'm passing multiple messages into the graph (from ~10 to ~100000). Sometimes one of the nodes throws an exception. If that's the case, the execution of the entire graph is cancelled, meaning all messages are discarded. However, my messages are independent from each other and I don't want their execution to be stopped.
I can catch the exception directly inside the node, but when that happens the further processing of the message won't make sense.
So my question is: how can I cancel or remove a single message from the graph without cancelling the execution of the other messages that are already in the graph?