Class ParallelExceptions

Inheritance Relationships

Base Type

Class Documentation

class ParallelExceptions : public sequant::Exception

thrown by the parallel primitives (sequant::parallel_do, sequant::for_each, sequant::transform_reduce) when more than one invocation of the work function throws; a single exception is rethrown as is

Public Types

using Entry = std::pair<std::size_t, std::exception_ptr>

the ordinal of a work item (the thread id for parallel_do) and the exception its invocation threw

Public Functions

inline explicit ParallelExceptions(std::vector<Entry> exceptions)
Parameters:

exceptions – at least two entries, ordered by item ordinal

inline const std::vector<Entry> &exceptions() const
Returns:

the exceptions, ordered by the ordinal of the item that threw each; std::rethrow_exception recovers their types