Bayeux
3.4.1
Core Foundation library for SuperNEMO
Main Page
Related Pages
+
Namespaces
Namespace List
+
Namespace Members
+
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
x
y
z
Variables
+
Typedefs
a
b
c
d
e
f
g
h
i
m
o
p
r
s
u
v
w
+
Enumerations
a
b
c
d
e
g
m
n
o
p
r
s
u
v
+
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
x
y
z
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
+
Enumerations
a
b
c
d
e
f
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Properties
+
Related Functions
b
c
h
i
m
o
p
s
v
+
Files
File List
+
File Members
+
All
_
b
c
d
e
g
m
Functions
+
Macros
_
b
c
d
e
g
m
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
bayeux
datatools
exception.h
Go to the documentation of this file.
1
//
12
// Copyright (c) 2013 by Ben Morgan <bmorgan.warwick@gmail.com>
13
// Copyright (c) 2013 by The University of Warwick
14
//
15
// This file is part of datatools.
16
//
17
// datatools is free software: you can redistribute it and/or modify
18
// it under the terms of the GNU General Public License as published by
19
// the Free Software Foundation, either version 3 of the License, or
20
// (at your option) any later version.
21
//
22
// datatools is distributed in the hope that it will be useful,
23
// but WITHOUT ANY WARRANTY; without even the implied warranty of
24
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25
// GNU General Public License for more details.
26
//
27
// You should have received a copy of the GNU General Public License
28
// along with datatools. If not, see <http://www.gnu.org/licenses/>.
29
30
#ifndef DATATOOLS_EXCEPTION_H
31
#define DATATOOLS_EXCEPTION_H
32
// Standard Library:
33
#include <stdexcept>
34
#include <sstream>
35
36
// Third Party:
37
// - Boost:
38
#include <boost/current_function.hpp>
39
76
#define DT_THROW_IF(Condition, ExceptionType, Message) \
77
{ \
78
if (Condition) { \
79
std::stringstream sDT_THROW_IF_ONLY; \
80
sDT_THROW_IF_ONLY << "[" << BOOST_CURRENT_FUNCTION << ":" << __LINE__ << ": " << Message << "]"; \
81
throw ExceptionType(sDT_THROW_IF_ONLY.str()); \
82
} \
83
}
84
85
121
#define DT_THROW(ExceptionType, Message) \
122
{ \
123
std::stringstream sDT_THROW_ONLY; \
124
sDT_THROW_ONLY << "[" << BOOST_CURRENT_FUNCTION << ":" << __LINE__ << ": " << Message << "]"; \
125
throw ExceptionType(sDT_THROW_ONLY.str()); \
126
}
127
128
#endif // DATATOOLS_EXCEPTION_H
129
130
// Local Variables: --
131
// mode: c++ --
132
// c-file-style: "gnu" --
133
// tab-width: 2 --
134
// End: --
Generated by
1.8.15