This repository was archived by the owner on Dec 27, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexceptionAPI.d
More file actions
59 lines (57 loc) · 1.93 KB
/
exceptionAPI.d
File metadata and controls
59 lines (57 loc) · 1.93 KB
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
module exceptionAPI;
class ExceptionAPI : Throwable {
/**
* Creates a new instance of Exception. The next parameter is used
* internally and should always be $(D null) when passed by user code.
* This constructor does not automatically throw the newly-created
* Exception; the $(D throw) statement should be used for that purpose.
*/
@nogc @safe pure nothrow this(uint i, string file = __FILE__, size_t line = __LINE__, Throwable next = null)
{
string msg;
switch(i) {
case 1:
msg = "IUtil API has failed unit test.";
break;
case 2:
msg = "ITimer API has failed unit test.";
break;
case 3:
msg = "ICIniFile API has failed unit test.";
static if (__traits(compiles, EXT_ICINIFILE)) {
if (pICInifile)
pICInifile.m_release(pICInifile);
pICInifile = null;
}
break;
case 4:
msg = "ICommand API has failed unit test.";
break;
case 5:
msg = "IObject API has failed unit test.";
break;
case 6:
msg = "IPlayer API has failed unit test.";
break;
case 7:
msg = "IAdmin API has failed unit test.";
break;
case 8:
msg = "IHaloEngine API has failed unit test.";
break;
case 9:
default:
msg = "Unknown API has failed unit test.";
break;
}
super(msg, file, line, next);
}
@nogc @safe pure nothrow this(uint i, Throwable next, string file = __FILE__, size_t line = __LINE__)
{
super("", file, line, next);
}
@nogc @safe pure nothrow this(uint i, Throwable next)
{
super("", next);
}
}