PELibError is the name of an exception that can
12 | be thrown, usually during validation of MSIL code.
13 | For example calling Method::Optimize will validate the code,
14 | which may throw this exception. The possible errors
15 | are:
16 |
17 | enum ErrorList
18 | {
19 |
20 | ///** More params are being aded after a vararg param has been
21 | added
22 |
23 | VarargParamsAlreadyDeclared,
24 |
25 | ///** If calculations show that the stack would underflow
26 | somewhere in the method
27 |
28 | StackUnderflow,
29 |
30 | ///** A label can be reached but the paths don't agree on how
31 | many
32 |
33 | // things are currently on the stack
34 |
35 | MismatchedStack,
36 |
37 | ///** The stack is unbalanced when the RET statement is hit
38 |
39 | // This can mean either that there are elements on the stack in
40 |
41 | // a function that has no return value, or there is not exactly
42 | '
43 |
44 | //one element on the stack when the function has a return value.
45 |
46 | StackNotEmpty,
47 |
48 | ///** A label has been defined twice
49 |
50 | DuplicateLabel,
51 |
52 | ///** A label that has been referenced was not found
53 |
54 | MissingLabel,
55 |
56 | ///** the short version of some branch was requested, but the
57 | target
58 |
59 | // is out of range.
60 |
61 | ShortBranchOutOfRange,
62 |
63 | ///** the short version of an instruction which references a
64 |
65 | // local variable or a parameter was referenced, but the index
66 | is out
67 |
68 | // of range
69 |
70 | IndexOutOfRange,
71 |
72 | ///** There are multiple entry points
73 |
74 | MultipleEntryPoints,
75 |
76 | ///** There is no entry point (note that if it is a DLL an entry
77 | point isn't needed)
78 |
79 | MissingEntryPoint
80 |
81 | ///** Expected this tag to be 'try' begin
82 |
83 | Expected SEH Try,
84 |
85 | ///** Expected an SEH block other than 'try'
86 |
87 | Expected SEH handler,
88 |
89 | ///** An end tag didn't match the begin tag
90 |
91 | MismatchedSEHTag,
92 |
93 | ///** an SEH begin tag has no corresponding end tag, or an end is out of sequence
94 |
95 | OrphanedSEHTag,
96 |
97 | ///** The filter expression is in an invalid place
98 |
99 | InvalidSEHFilter,
100 |
101 | ///** leave, or endfinally/endfault/endfilter not used correctly
102 |
103 | InvalidSEHEpilogue,
104 | };
105 |
106 |
107 |
108 | Note that the
SEH validity checking does not
109 | check whether incorrect combinations of handler blocks are listed
110 | for a single try.
111 |