LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
ExceptionCollector.cc
Go to the documentation of this file.
3 
4 #include <cassert>
5 #include <memory>
6 
7 using namespace art;
8 
9 namespace {
10  Exception
11  make_exception_from_ptr(std::exception_ptr const& eptr) try {
12  std::rethrow_exception(eptr);
13  }
14  catch (std::exception const& e) {
15  return Exception{errors::OtherArt} << e.what();
16  }
17 }
18 
19 [[noreturn]] void
21 {
22  assert(!empty());
23 
24  auto top_e =
25  std::make_unique<Exception>(make_exception_from_ptr(exceptions_.front()));
26  for (auto i = std::begin(exceptions_) + 1, e = std::end(exceptions_); i != e;
27  ++i) {
28  auto eptr = make_exception_from_ptr(*i);
29  top_e->append(eptr);
30  }
31  exceptions_.clear();
32 
33  throw *top_e;
34 }
std::vector< evd::details::RawDigitInfo_t >::const_iterator begin(RawDigitCacheDataClass const &cache)
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
HLT enums.
std::vector< evd::details::RawDigitInfo_t >::const_iterator end(RawDigitCacheDataClass const &cache)
Float_t e
Definition: plot.C:34
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33