LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
ExceptionCollector.h
Go to the documentation of this file.
1
#ifndef art_Framework_EventProcessor_detail_ExceptionCollector_h
2
#define art_Framework_EventProcessor_detail_ExceptionCollector_h
3
4
// ======================================================================
5
//
6
// ExceptionCollector - Utility used to collect exceptions thrown when
7
// invoking functions that were provided to ExceptionCollector::call.
8
// The semantics are different than cet::exception_collector in that
9
// the (compiled-generated) ExceptionCollector d'tor DOES NOT call
10
// rethrow.
11
//
12
// TODO: determine if this class should be removed in favor of the
13
// cet::exception_collector class.
14
//
15
// ======================================================================
16
17
#include <exception>
18
#include <vector>
19
20
namespace
art
{
21
namespace
detail {
22
class
ExceptionCollector;
23
}
24
}
25
26
class
art::detail::ExceptionCollector
{
27
public
:
28
bool
29
empty
() const noexcept
30
{
31
return
exceptions_
.empty();
32
}
33
[[noreturn]]
void
rethrow
();
34
35
template
<
typename
F>
36
void
37
call
(F
f
)
try
{
38
f
();
39
}
40
catch
(...) {
41
exceptions_
.push_back(std::current_exception());
42
}
43
44
private
:
45
std::vector<std::exception_ptr>
exceptions_
{};
46
};
47
48
#endif
/* art_Framework_EventProcessor_detail_ExceptionCollector_h */
49
50
// Local Variables:
51
// mode: c++
52
// End:
art::detail::ExceptionCollector::empty
bool empty() const noexcept
Definition:
ExceptionCollector.h:29
art::detail::ExceptionCollector
Definition:
ExceptionCollector.h:26
f
TFile f
Definition:
plotHisto.C:6
art::detail::ExceptionCollector::exceptions_
std::vector< std::exception_ptr > exceptions_
Definition:
ExceptionCollector.h:45
art::detail::ExceptionCollector::rethrow
void rethrow()
Definition:
ExceptionCollector.cc:20
art::detail::ExceptionCollector::call
void call(F f)
Definition:
ExceptionCollector.h:37
art
HLT enums.
Definition:
ServiceProviderWrappers.h:36
art
Framework
EventProcessor
detail
ExceptionCollector.h
Generated on Thu Jul 26 2018 13:09:40 for LArSoft by
1.8.11