Skip to content

Fix try/catch/finally il code generation#42

Open
vCipher wants to merge 1 commit intotonerdo:masterfrom
vCipher:master
Open

Fix try/catch/finally il code generation#42
vCipher wants to merge 1 commit intotonerdo:masterfrom
vCipher:master

Conversation

@vCipher
Copy link
Contributor

@vCipher vCipher commented Dec 3, 2018

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()

Wrong exception handler instruction order failed:

  1. begin exception block
  2. begin exception block
  3. begin catch handler
  4. begin finally handler
  5. end catch handler
  6. end finally handler

I have fixed instruction order. Now order is:

  1. begin exception block
  2. begin exception block
  3. begin catch handler
  4. end catch handler
  5. begin finally handler
  6. end finally handler

@jwdonahue
Copy link

Why hasn't this fix been accepted? Is this project dead?

Miista pushed a commit to Miista/pose that referenced this pull request Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants