Joos1W Compiler Framework
Error.h
1
#
pragma
once
2
3
#
include
<
stdexcept
>
4
5
namespace
utils {
6
7
class
FatalError
:
public
std::runtime_error {
8
public
:
9
explicit
FatalError(
const
std::string& what =
""
)
10
: std::runtime_error(get_trace(what)) {}
11
12
private
:
13
std::string get_trace(
const
std::string& what);
14
};
15
16
class
AssertError
:
public
std::runtime_error {
17
public
:
18
explicit
AssertError(
const
std::string& what =
""
)
19
: std::runtime_error(get_trace(what)) {}
20
21
private
:
22
std::string get_trace(
const
std::string& what);
23
};
24
25
}
// namespace utils
include
utils
Error.h
Generated by
1.9.1