Review fix.

This commit is contained in:
Nikolai Kochetov 2020-09-04 15:54:31 +03:00
parent 13e0464138
commit 7f88e3de1f

View File

@ -402,6 +402,11 @@ void PipelineExecutor::execute(size_t num_threads)
for (auto & node : graph->nodes)
if (node->exception)
std::rethrow_exception(node->exception);
/// Exception which happened in executing thread, but not at processor.
for (auto & executor_context : executor_contexts)
if (executor_context->exception)
std::rethrow_exception(executor_context->exception);
}
catch (...)
{
@ -432,11 +437,6 @@ bool PipelineExecutor::executeStep(std::atomic_bool * yield_flag)
if (node->exception)
std::rethrow_exception(node->exception);
/// Exception which happened in executing thread, but not at processor.
for (auto & executor_context : executor_contexts)
if (executor_context->exception)
std::rethrow_exception(executor_context->exception);
finalizeExecution();
return false;