Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
fhiclcpp
fhiclcpp
detail
try_blocks.h
Go to the documentation of this file.
1
#ifndef fhiclcpp_detail_try_blocks_h
2
#define fhiclcpp_detail_try_blocks_h
3
4
#include "
fhiclcpp/exception.h
"
5
6
#include <string>
7
8
namespace
fhicl::detail
{
9
template
<
typename
L>
10
void
11
try_insert
(L
l
,
std::string
const
&
key
)
try
{
12
l
(key);
13
}
14
catch
(boost::bad_lexical_cast
const
&
e
) {
15
throw
fhicl::exception
{
cant_insert
,
key
} << e.what();
16
}
17
catch
(boost::bad_numeric_cast
const
& e) {
18
throw
fhicl::exception
{
cant_insert
,
key
} << e.what();
19
}
20
catch
(
fhicl::exception
const
& e) {
21
throw
fhicl::exception
{
cant_insert
,
key
, e};
22
}
23
catch
(
std::exception
const
& e) {
24
throw
fhicl::exception
{
cant_insert
,
key
} << e.what();
25
}
26
}
27
28
#endif
/* fhiclcpp_detail_try_blocks_h */
29
30
// Local variables:
31
// mode: c++
32
// End:
string
std::string string
Definition:
nybbler.cc:12
fhicl::cant_insert
Definition:
exception.h:18
l
static QStrList * l
Definition:
config.cpp:1044
exception.h
fhicl::detail::try_insert
void try_insert(L l, std::string const &key)
Definition:
try_blocks.h:11
e
const double e
Definition:
gUpMuFluxGen.cxx:165
wirecell.dfp.graph.key
def key(type, name=None)
Definition:
graph.py:13
fhicl::detail
Definition:
coding.h:43
fhicl::exception
cet::coded_exception< error, detail::translate > exception
Definition:
exception.h:33
Generated by
1.8.11