MUDA
Loading...
Searching...
No Matches
exception.h
1
#pragma once
2
#include <muda/muda_def.h>
3
#include <exception>
4
#include <string>
5
6
namespace
muda
7
{
8
class
exception
:
public
std::exception
9
{
10
std::string m_what;
11
12
public
:
13
exception
(
const
std::string& msg)
14
: m_what(msg)
15
{
16
}
17
virtual
char
const
* what()
const
18
#ifdef MUDA_PLATFORM_LINUX
19
MUDA_NOEXCEPT
20
#endif
21
{
22
return
m_what.c_str();
23
}
24
};
25
26
class
not_implemented
:
public
exception
27
{
28
public
:
29
not_implemented
(
const
std::string& msg)
30
:
exception
(msg)
31
{
32
}
33
};
34
35
class
invalid_argument
:
public
exception
36
{
37
public
:
38
invalid_argument
(
const
std::string& msg)
39
:
exception
(msg)
40
{
41
}
42
};
43
44
class
out_of_range
:
public
exception
45
{
46
public
:
47
out_of_range
(
const
std::string& msg)
48
:
exception
(msg)
49
{
50
}
51
};
52
53
class
runtime_error
:
public
exception
54
{
55
public
:
56
runtime_error
(
const
std::string& msg)
57
:
exception
(msg)
58
{
59
}
60
};
61
62
class
logic_error
:
public
exception
63
{
64
public
:
65
logic_error
(
const
std::string& msg)
66
:
exception
(msg)
67
{
68
}
69
};
70
}
// namespace muda
muda::exception
Definition
exception.h:9
muda::invalid_argument
Definition
exception.h:36
muda::logic_error
Definition
exception.h:63
muda::not_implemented
Definition
exception.h:27
muda::out_of_range
Definition
exception.h:45
muda::runtime_error
Definition
exception.h:54
src
muda
exception.h
Generated by
1.9.8