Esempio n. 1
0
 public static BlockInfo Catch(Int32 jumpIndex, ExeptionInfo exInfo)
 {
     return(new BlockInfo()
     {
         Type = BlockType.Catch,
         JumpIndex = jumpIndex,
         ExInfo = exInfo
     });
 }
Esempio n. 2
0
        public EHTryEntity ThrowLogicForMethod(ExeptionInfo exeptionInfo)
        {
            EHTryEntity catchHandler = this.MethodDesc.EHTable.GetCatchIfExists(State.CurrInstIdx, exeptionInfo.Token);
            Int32       catchIndex   = 0;

            if (catchHandler != null)
            {
                State.BlockJump.Push(BlockInfo.Catch(catchHandler.HandlerOffset, exeptionInfo));
                catchIndex = catchHandler.Index;
            }
            else
            {
                State.MethodPendingFinallies = true;
            }

            AddFinalliesToStack(catchIndex);

            var blockInfo = State.BlockJump.Pop();

            JumpToBlock(blockInfo);

            return(catchHandler);
        }