This repository has been archived by the owner on Oct 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patherrors.js
133 lines (133 loc) · 3.53 KB
/
errors.js
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
var _a;
class CustomError extends Error {
constructor() {
super(...arguments);
this.code = () => "E" + this.level + this.codenum;
}
}
class InternalError extends CustomError {
}
class CommandError extends InternalError {
resolve(message) {
return message.channel.send("Error [" + this.name + "] occurred (" + this.code() + "): " + this.message);
}
}
class CheckError extends CommandError {
}
class Errors {
}
_a = Errors;
Errors.EN0000 = class extends CommandError {
constructor(message = "Parameter Error.") {
super(message);
this.name = "ParameterError";
this.level = "N";
}
};
Errors.EN0001 = class extends _a.EN0000 {
constructor(message = "Missing parameter.") {
super(message);
this.name = "MissingParameter";
this.codenum = "0001";
this.level = "N";
}
};
Errors.EN0002 = class extends _a.EN0000 {
constructor(message = "Invalid parameter.") {
super(message);
this.name = "InvalidParameter";
this.codenum = "0002";
this.level = "N";
}
};
/**
* @deprecated Invalid parameter position is no longer be accepted.
*/
Errors.EN0003 = class extends _a.EN0000 {
constructor(message = "Invalid parameter position.") {
super(message);
this.name = "InvalidParameterPosition";
this.codenum = "0003";
this.level = "N";
}
};
Errors.EN0110 = class extends CheckError {
constructor(message = "Missing permission.") {
super(message);
this.name = "MissingPermission";
this.level = "N";
}
};
Errors.EN0111 = class extends _a.EN0110 {
constructor(message = "Missing Developer permission.") {
super(message);
this.codenum = "0111";
}
};
Errors.EN0112 = class extends _a.EN0110 {
constructor(message = "Missing Administraction permission.") {
super(message);
this.codenum = "0112";
}
};
Errors.EN0010 = class extends _a.EN0000 {
constructor(message = "Missing permission.") {
super(message);
this.name = "FlagError";
this.level = "N";
}
};
Errors.EN0011 = class extends _a.EN0001 {
constructor(message = "Missing flag.") {
super(message);
this.name = "MissingFlag";
this.codenum = "0011";
}
};
Errors.EN0012 = class extends _a.EN0002 {
constructor(message = "Invalid flag.") {
super(message);
this.name = "InvalidFlag";
this.codenum = "0012";
}
};
/**
* @deprecated
*/
Errors.EN0013 = class extends _a.EN0003 {
constructor(message = "Invalid flag number.") {
super(message);
this.name = "InvalidFlagNumber";
this.codenum = "0013";
}
};
Errors.EN0020 = class extends _a.EN0010 {
constructor(message = "Flag Parameter Error.") {
super(message);
this.name = "FlagParameterError";
this.level = "N";
}
};
Errors.EN0021 = class extends _a.EN0001 {
constructor(message = "Missing flag parameter.") {
super(message);
this.name = "MissingFlagParameter";
this.codenum = "0021";
}
};
Errors.EN0022 = class extends _a.EN0002 {
constructor(message = "Missing flag parameter.") {
super(message);
this.name = "MissingFlagParameter";
this.codenum = "0022";
}
};
Errors.EN1010 = class extends _a.EN0000 {
constructor(message = "Flag Parameter Error.") {
super(message);
this.name = "SubcommandError";
this.level = "N";
}
};
export { CustomError, InternalError, CommandError, Errors };
//# sourceMappingURL=errors.js.map