BornAgain
1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
Exceptions.h
Go to the documentation of this file.
1
// ************************************************************************** //
2
//
3
// BornAgain: simulate and fit scattering at grazing incidence
4
//
5
//! @file Base/Types/Exceptions.h
6
//! @brief Defines many exception classes in namespace Exceptionss.
7
//!
8
//! @homepage http://www.bornagainproject.org
9
//! @license GNU General Public License v3 or higher (see COPYING)
10
//! @copyright Forschungszentrum Jülich GmbH 2018
11
//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12
//
13
// ************************************************************************** //
14
15
#ifndef BORNAGAIN_BASE_TYPES_EXCEPTIONS_H
16
#define BORNAGAIN_BASE_TYPES_EXCEPTIONS_H
17
18
#include <stdexcept>
19
#include <string>
20
21
#ifdef _WIN32
22
#ifdef _MSC_VER
23
#pragma warning(push)
24
#pragma warning(disable : 4275)
25
#endif
26
#endif
27
28
//! Different exceptions, all inheriting from std::exception.
29
30
namespace
Exceptions
31
{
32
33
class
NotImplementedException
:
public
std::logic_error
34
{
35
public
:
36
NotImplementedException
(
const
std::string& message);
37
};
38
39
class
NullPointerException
:
public
std::logic_error
40
{
41
public
:
42
NullPointerException
(
const
std::string& message);
43
};
44
45
class
OutOfBoundsException
:
public
std::logic_error
46
{
47
public
:
48
OutOfBoundsException
(
const
std::string& message);
49
};
50
51
class
ClassInitializationException
:
public
std::runtime_error
52
{
53
public
:
54
ClassInitializationException
(
const
std::string& message);
55
};
56
57
class
UnknownClassRegistrationException
:
public
std::runtime_error
58
{
59
public
:
60
UnknownClassRegistrationException
(
const
std::string& message);
61
};
62
63
class
ExistingClassRegistrationException
:
public
std::runtime_error
64
{
65
public
:
66
ExistingClassRegistrationException
(
const
std::string& message);
67
};
68
69
class
LogicErrorException
:
public
std::logic_error
70
{
71
public
:
72
LogicErrorException
(
const
std::string& message);
73
};
74
75
class
RuntimeErrorException
:
public
std::runtime_error
76
{
77
public
:
78
RuntimeErrorException
(
const
std::string& message);
79
};
80
81
class
DivisionByZeroException
:
public
std::runtime_error
82
{
83
public
:
84
DivisionByZeroException
(
const
std::string& message);
85
};
86
87
class
DomainErrorException
:
public
std::domain_error
88
{
89
public
:
90
DomainErrorException
(
const
std::string& message);
91
};
92
93
class
FileNotIsOpenException
:
public
std::runtime_error
94
{
95
public
:
96
FileNotIsOpenException
(
const
std::string& message);
97
};
98
99
class
FileIsBadException
:
public
std::runtime_error
100
{
101
public
:
102
FileIsBadException
(
const
std::string& message);
103
};
104
105
class
FormatErrorException
:
public
std::runtime_error
106
{
107
public
:
108
FormatErrorException
(
const
std::string& message);
109
};
110
111
void
LogExceptionMessage(
const
std::string& message);
112
113
}
// namespace Exceptions
114
115
#ifdef _WIN32
116
#ifdef _MSC_VER
117
#pragma warning(pop)
118
#endif
119
#endif
120
121
#endif
// BORNAGAIN_BASE_TYPES_EXCEPTIONS_H
Exceptions::ClassInitializationException
Definition:
Exceptions.h:52
Exceptions::DivisionByZeroException
Definition:
Exceptions.h:82
Exceptions::DomainErrorException
Definition:
Exceptions.h:88
Exceptions::ExistingClassRegistrationException
Definition:
Exceptions.h:64
Exceptions::FileIsBadException
Definition:
Exceptions.h:100
Exceptions::FileNotIsOpenException
Definition:
Exceptions.h:94
Exceptions::FormatErrorException
Definition:
Exceptions.h:106
Exceptions::LogicErrorException
Definition:
Exceptions.h:70
Exceptions::NotImplementedException
Definition:
Exceptions.h:34
Exceptions::NullPointerException
Definition:
Exceptions.h:40
Exceptions::OutOfBoundsException
Definition:
Exceptions.h:46
Exceptions::RuntimeErrorException
Definition:
Exceptions.h:76
Exceptions::UnknownClassRegistrationException
Definition:
Exceptions.h:58
Exceptions
Different exceptions, all inheriting from std::exception.
Definition:
Exceptions.cpp:19
Base
Types
Exceptions.h
Generated by
1.9.1