Public Member Functions | Private Attributes | List of all members
art::detail::ExceptionCollector Class Reference

#include <ExceptionCollector.h>

Public Member Functions

bool empty () const noexcept
 
void rethrow ()
 
template<typename F >
void call (F f)
 

Private Attributes

std::vector< std::exception_ptr > exceptions_ {}
 

Detailed Description

Definition at line 22 of file ExceptionCollector.h.

Member Function Documentation

template<typename F >
void art::detail::ExceptionCollector::call ( f)
inline

Definition at line 33 of file ExceptionCollector.h.

33  {
34  f();
35  }
36  catch (...) {
37  exceptions_.push_back(std::current_exception());
38  }
std::vector< std::exception_ptr > exceptions_
bool art::detail::ExceptionCollector::empty ( ) const
inlinenoexcept

Definition at line 25 of file ExceptionCollector.h.

26  {
27  return exceptions_.empty();
28  }
std::vector< std::exception_ptr > exceptions_
void art::detail::ExceptionCollector::rethrow ( )

Definition at line 18 of file ExceptionCollector.cc.

19 {
20  assert(!empty());
22  for (auto const e : exceptions_) {
23  message += exception_msg_from_ptr(e);
24  }
25  exceptions_.clear();
26  throw collected_exception{move(message)};
27 }
std::string string
Definition: nybbler.cc:12
const double e
std::vector< std::exception_ptr > exceptions_
def move(depos, offset)
Definition: depos.py:107

Member Data Documentation

std::vector<std::exception_ptr> art::detail::ExceptionCollector::exceptions_ {}
private

Definition at line 41 of file ExceptionCollector.h.


The documentation for this class was generated from the following files: