forked from neutralinojs/neutralinojs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
errors.h
69 lines (59 loc) · 1.21 KB
/
errors.h
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#ifndef NEU_ERRORS_H
#define NEU_ERRORS_H
#include <string>
#include "lib/json/json.hpp"
using namespace std;
using json = nlohmann::json;
namespace errors {
enum StatusCode {
// no-error
NE_ST_OK,
// storage
NE_ST_INVSTKY,
NE_ST_NOSTKEX,
NE_ST_STKEYWE,
NE_ST_NOSTDIR,
// os
NE_OS_UNLTOUP,
NE_OS_INVNOTA,
NE_OS_INVMSGA,
NE_OS_TRAYIER,
NE_OS_INVKNPT,
// extensions
NE_EX_EXTNOTC,
// filesystem
NE_FS_FILWRER,
NE_FS_DIRCRER,
NE_FS_REMVERR,
NE_FS_FILRDER,
NE_FS_NOPATHE,
NE_FS_COPYERR,
NE_FS_MOVEERR,
NE_FS_FILOPER,
NE_FS_UNLTOUP,
NE_FS_UNLTFOP,
NE_FS_UNLCWAT,
NE_FS_NOWATID,
// window
NE_CF_UNBLWCF,
// router
NE_RT_INVTOKN,
NE_RT_APIPRME,
NE_RT_NATPRME,
NE_RT_NATRTER,
NE_RT_NATNTIM,
// resources
NE_RS_TREEGER,
NE_RS_UNBLDRE,
// server
NE_SR_UNBSEND,
NE_SR_UNBPARS,
// config
NE_CF_UNBLDCF,
NE_CF_UNSUPMD
};
json makeMissingArgErrorPayload();
json makeErrorPayload(const errors::StatusCode code, const string ¶m = "");
string makeErrorMsg(const errors::StatusCode code, const string ¶m = "");
} // namespace errors
#endif // #define NEU_ERRORS_H