Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
ExceptionRegion.cs
Go to the documentation of this file.
2
3public readonly struct ExceptionRegion
4{
5 private readonly ExceptionRegionKind _kind;
6
7 private readonly int _tryOffset;
8
9 private readonly int _tryLength;
10
11 private readonly int _handlerOffset;
12
13 private readonly int _handlerLength;
14
15 private readonly int _classTokenOrFilterOffset;
16
18
19 public int TryOffset => _tryOffset;
20
21 public int TryLength => _tryLength;
22
24
26
27 public int FilterOffset
28 {
29 get
30 {
31 if (Kind != ExceptionRegionKind.Filter)
32 {
33 return -1;
34 }
36 }
37 }
38
40 {
41 get
42 {
43 if (Kind != 0)
44 {
45 return default(EntityHandle);
46 }
48 }
49 }
50
51 internal ExceptionRegion(ExceptionRegionKind kind, int tryOffset, int tryLength, int handlerOffset, int handlerLength, int classTokenOrFilterOffset)
52 {
53 _kind = kind;
54 _tryOffset = tryOffset;
55 _tryLength = tryLength;
56 _handlerOffset = handlerOffset;
57 _handlerLength = handlerLength;
58 _classTokenOrFilterOffset = classTokenOrFilterOffset;
59 }
60}
ExceptionRegion(ExceptionRegionKind kind, int tryOffset, int tryLength, int handlerOffset, int handlerLength, int classTokenOrFilterOffset)