LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
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
{
9
namespace
detail {
10
11
template
<
typename
L>
12
void
13
try_insert
(L l, std::string
const
& key)
try
{
14
l(key);
15
}
16
catch
(boost::bad_lexical_cast
const
&
e
) {
17
throw
fhicl::exception
(
cant_insert
, key) << e.what();
18
}
19
catch
(boost::bad_numeric_cast
const
& e) {
20
throw
fhicl::exception
(
cant_insert
, key) << e.what();
21
}
22
catch
(
fhicl::exception
const
& e) {
23
throw
fhicl::exception
(
cant_insert
, key, e);
24
}
25
catch
(
std::exception
const
& e) {
26
throw
fhicl::exception
(
cant_insert
, key) << e.what();
27
}
28
}
29
}
30
31
#endif
/* fhiclcpp_detail_try_blocks_h */
32
33
// Local variables:
34
// mode: c++
35
// End:
fhicl::cant_insert
Definition:
exception.h:18
fhicl::detail::try_insert
void try_insert(L l, std::string const &key)
Definition:
try_blocks.h:13
fhicl
parameter set interface
Definition:
ServiceProviderWrappers.h:37
e
Float_t e
Definition:
plot.C:34
fhicl::exception
cet::coded_exception< error, detail::translate > exception
Definition:
exception.h:33
exception.h
fhiclcpp
detail
try_blocks.h
Generated on Thu Jul 26 2018 13:09:45 for LArSoft by
1.8.11