* DotNetPELib - PELibError
PELibError
PELibError is the name of an exception that can be thrown, usually during validation of MSIL code.   For example calling Method::Optimize will validate the code, which may throw this exception.   The possible errors are:

        enum ErrorList
        {
            ///** More params are being aded after a vararg param has been added
            VarargParamsAlreadyDeclared,
            ///** If calculations show that the stack would underflow somewhere in the method
            StackUnderflow,
            ///** A label can be reached but the paths don't agree on how many
            // things are currently on the stack
            MismatchedStack,
            ///** The stack is unbalanced when the RET statement is hit
            // This can mean either that there are elements on the stack in
            // a function that has no return value, or there is not exactly '
            //one element on the stack when the function has a return value.
            StackNotEmpty,
            ///** A label has been defined twice
            DuplicateLabel,
            ///** A label that has been referenced was not found
            MissingLabel,
            ///** the short version of some branch was requested, but the target
            // is out of range.
            ShortBranchOutOfRange,
            ///** the short version of an instruction which references a
            // local variable or a parameter was referenced, but the index is out
            // of range
            IndexOutOfRange,
            ///** There are multiple entry points
            MultipleEntryPoints,
            ///** There is no entry point (note that if it is a DLL an entry point isn't needed)
            MissingEntryPoint
            ///** Expected this tag to be 'try' begin
            Expected SEH Try,
            ///** Expected an SEH block other than 'try'
            Expected SEH handler,
            ///** An end tag didn't match the begin tag
            MismatchedSEHTag,
            ///** an SEH begin tag has no corresponding end tag, or an end is out of sequence
            OrphanedSEHTag,
            ///** The filter expression is in an invalid place
            InvalidSEHFilter,
            ///** leave, or endfinally/endfault/endfilter not used correctly
            InvalidSEHEpilogue,
    };


Note that the SEH validity checking does not check whether incorrect combinations of handler blocks are listed for a single try.