sfof
sfof
src
exceptions.hpp
Go to the documentation of this file.
1
#ifndef FOF_EXCEPTIONS_HPP
2
#define FOF_EXCEPTIONS_HPP
3
4
#include <stdexcept>
5
#include <string>
6
8
class
BadArgumentException
:
public
std::invalid_argument
9
{
10
public
:
11
BadArgumentException
(
const
std::string& arg_name,
const
std::string& expected);
12
BadArgumentException
(
const
std::string& context,
13
const
std::string& arg_name,
const
std::string& expected);
14
virtual
~BadArgumentException
() throw(){}
15
virtual
const
char
*
what
()
const
throw();
16
protected:
17
std::
string
message
;
18
19
};
20
22
class
DomainException
: public std::domain_error
23
{
24
public
:
25
DomainException
(
const
std::string& context,
const
std::string& report);
26
virtual
~DomainException
() throw(){}
27
virtual
const
char
*
what
()
const
throw();
28
protected:
29
std::
string
message
;
30
31
};
32
34
class
RuntimeException
: public std::runtime_error
35
{
36
public
:
37
RuntimeException
(
const
std::string& context,
const
std::string& member_name,
38
const
std::string& expected);
39
RuntimeException
(
const
std::string& context,
const
std::string& error);
40
virtual
~RuntimeException
() throw(){}
41
virtual
const
char
*
what
()
const
throw();
42
protected:
43
std::
string
message
;
44
45
};
46
47
#endif
BadArgumentException::~BadArgumentException
virtual ~BadArgumentException()
Definition:
exceptions.hpp:14
RuntimeException::~RuntimeException
virtual ~RuntimeException()
Definition:
exceptions.hpp:40
RuntimeException
Class for runtime exceptions.
Definition:
exceptions.hpp:35
DomainException::~DomainException
virtual ~DomainException()
Definition:
exceptions.hpp:26
BadArgumentException::BadArgumentException
BadArgumentException(const std::string &arg_name, const std::string &expected)
Definition:
exceptions.cpp:3
DomainException
Class for domain exceptions.
Definition:
exceptions.hpp:23
BadArgumentException::message
std::string message
Definition:
exceptions.hpp:17
BadArgumentException::what
virtual const char * what() const
Definition:
exceptions.cpp:17
BadArgumentException
Class for bad argument exceptions.
Definition:
exceptions.hpp:9
Generated on Sat May 30 2020 10:16:29 for sfof by
1.8.18