-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMyLCL_Exception.inc
104 lines (91 loc) · 2.49 KB
/
MyLCL_Exception.inc
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
//----------------------------------------
// The code is automatically generated by the GenlibLcl tool.
// Copyright © ying32. All Rights Reserved.
//
// Licensed under Lazarus.modifiedLGPL
//
//----------------------------------------
//CLASSMETHOD:
function Exception_ToString(AObj: Exception): PChar; extdecl;
begin
{$ifdef UsehandleException}Result := PChar(nil);{$endif}
handleExceptionBegin
Result := PChar(AObj.ToString);
handleExceptionEnd
end;
//CLASSMETHOD:
function Exception_ClassType(AObj: Exception): TClass; extdecl;
begin
{$ifdef UsehandleException}Result := TClass(nil);{$endif}
handleExceptionBegin
Result := AObj.ClassType;
handleExceptionEnd
end;
//CLASSMETHOD:
function Exception_ClassName(AObj: Exception): PChar; extdecl;
begin
{$ifdef UsehandleException}Result := nil;{$endif}
handleExceptionBegin
Result := ToPChar(AObj.ClassName);
handleExceptionEnd
end;
//CLASSMETHOD:
function Exception_InstanceSize(AObj: Exception): Integer; extdecl;
begin
{$ifdef UsehandleException}Result := Integer(0);{$endif}
handleExceptionBegin
Result := AObj.InstanceSize;
handleExceptionEnd
end;
//CLASSMETHOD:
function Exception_InheritsFrom(AObj: Exception; AClass: TClass): LongBool; extdecl;
begin
{$ifdef UsehandleException}Result := False;{$endif}
handleExceptionBegin
Result := AObj.InheritsFrom(AClass);
handleExceptionEnd
end;
//CLASSMETHOD:
function Exception_Equals(AObj: Exception; Obj: TObject): LongBool; extdecl;
begin
{$ifdef UsehandleException}Result := False;{$endif}
handleExceptionBegin
Result := AObj.Equals(Obj);
handleExceptionEnd
end;
//CLASSMETHOD:
function Exception_GetHashCode(AObj: Exception): Integer; extdecl;
begin
{$ifdef UsehandleException}Result := Integer(0);{$endif}
handleExceptionBegin
Result := AObj.GetHashCode;
handleExceptionEnd
end;
function Exception_GetMessage(AObj: Exception): PChar; extdecl;
begin
{$ifdef UsehandleException}Result := PChar(nil);{$endif}
handleExceptionBegin
Result := PChar(AObj.Message);
handleExceptionEnd
end;
procedure Exception_SetMessage(AObj: Exception; AValue: PChar); extdecl;
begin
handleExceptionBegin
AObj.Message := AValue;
handleExceptionEnd
end;
function Exception_StaticClassType: TClass; extdecl;
begin
Result := Exception;
end;
exports
Exception_ToString,
Exception_ClassType,
Exception_ClassName,
Exception_InstanceSize,
Exception_InheritsFrom,
Exception_Equals,
Exception_GetHashCode,
Exception_GetMessage,
Exception_SetMessage,
Exception_StaticClassType;