LArSoft
v09_90_00
Liquid Argon Software toolkit - https://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::detail
{
9
template
<
typename
L>
10
void
11
try_insert
(L l, std::string
const
& key)
12
try
{
13
l(key);
14
}
15
catch
(boost::bad_lexical_cast
const
&
e
) {
16
throw
fhicl::exception
{
cant_insert
, key} << e.what();
17
}
18
catch
(boost::bad_numeric_cast
const
& e) {
19
throw
fhicl::exception
{
cant_insert
, key} << e.what();
20
}
21
catch
(
fhicl::exception
const
& e) {
22
throw
fhicl::exception
{
cant_insert
, key, e};
23
}
24
catch
(
std::exception
const
& e) {
25
throw
fhicl::exception
{
cant_insert
, key} << e.what();
26
}
27
}
28
29
#endif
/* fhiclcpp_detail_try_blocks_h */
30
31
// Local variables:
32
// mode: c++
33
// End:
fhicl::cant_insert
Definition:
exception.h:18
exception.h
fhicl::detail::try_insert
void try_insert(L l, std::string const &key)
Definition:
try_blocks.h:11
fhicl::detail
Definition:
coding.h:43
e
Float_t e
Definition:
plot.C:35
fhicl::exception
cet::coded_exception< error, detail::translate > exception
Definition:
exception.h:33
fhiclcpp
detail
try_blocks.h
Generated on Thu May 2 2024 20:59:31 for LArSoft by
1.8.11