There is some problem with methods contain try/catch/finally statement.
Pose.Tests.MethodRewriterTests.TestExceptionHandlersRewrite
Test method Pose.Tests.MethodRewriterTests.TestExceptionHandlersRewrite threw exception:
System.InvalidOperationException: Incorrect code generation for exception block.
at System.Reflection.Emit.ILGenerator.EndExceptionBlock()
at Pose.IL.MethodRewriter.EmitILForExceptionHandlers(ILGenerator ilGenerator, Instruction instruction, List`1 handlers)
at Pose.IL.MethodRewriter.Rewrite()
at Pose.Tests.MethodRewriterTests.TestExceptionHandlersRewrite()
There is some problem with methods contain try/catch/finally statement.
Wrong exception handler instruction order failed:
I have fixed instruction order. Now order is: