Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ BeginFinallyBlock()

virtual void System.Reflection.Emit.ILGenerator.BeginFinallyBlock ( )
inlinevirtual

Definition at line 858 of file ILGenerator.cs.

859 {
860 if (m_currExcStackCount == 0)
861 {
862 throw new NotSupportedException(SR.Argument_NotInExceptionBlock);
863 }
864 __ExceptionInfo _ExceptionInfo = m_currExcStack[m_currExcStackCount - 1];
865 int currentState = _ExceptionInfo.GetCurrentState();
866 Label endLabel = _ExceptionInfo.GetEndLabel();
867 int num = 0;
868 if (currentState != 0)
869 {
870 Emit(OpCodes.Leave, endLabel);
871 num = m_length;
872 }
873 MarkLabel(endLabel);
874 Label label = DefineLabel();
875 _ExceptionInfo.SetFinallyEndLabel(label);
876 Emit(OpCodes.Leave, label);
877 if (num == 0)
878 {
879 num = m_length;
880 }
881 _ExceptionInfo.MarkFinallyAddr(m_length, num);
882 }
virtual void MarkLabel(Label loc)

References System.SR.Argument_NotInExceptionBlock, System.Reflection.Emit.ILGenerator.DefineLabel(), System.Reflection.Emit.__ExceptionInfo.GetCurrentState(), System.Reflection.Emit.__ExceptionInfo.GetEndLabel(), System.Reflection.Emit.OpCodes.Leave, System.Reflection.Emit.ILGenerator.m_currExcStack, System.Reflection.Emit.ILGenerator.m_currExcStackCount, System.Reflection.Emit.ILGenerator.m_length, System.Reflection.Emit.__ExceptionInfo.MarkFinallyAddr(), System.Reflection.Emit.ILGenerator.MarkLabel(), and System.Reflection.Emit.__ExceptionInfo.SetFinallyEndLabel().

Referenced by System.Dynamic.Utils.DelegateHelpers.CreateObjectArrayDelegateRefEmit(), and System.Linq.Expressions.Compiler.LambdaCompiler.EmitTryExpression().