-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathcexception.h
More file actions
41 lines (32 loc) · 710 Bytes
/
cexception.h
File metadata and controls
41 lines (32 loc) · 710 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//
// Project: clibparser
// Author: bajdcc
//
#ifndef CLIBVM_EXCEPTION_H
#define CLIBVM_EXCEPTION_H
#include <exception>
#include "types.h"
namespace clib {
enum ex_t {
ex_none,
ex_unit,
ex_ast,
ex_parser,
ex_vm,
ex_gen,
ex_gui,
ex_mem,
ex_vfs,
};
const string_t &ex_str(ex_t);
class cexception : public std::exception {
public:
explicit cexception(ex_t e, const string_t &msg) noexcept;
cexception(const cexception& e) = default;
cexception &operator = (const cexception& e) = default;
string_t message() const;
string_t msg;
ex_t e{ex_none};
};
}
#endif