public static BlockInfo Catch(Int32 jumpIndex, ExeptionInfo exInfo) { return(new BlockInfo() { Type = BlockType.Catch, JumpIndex = jumpIndex, ExInfo = exInfo }); }
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); }