vescon / MethodBoundaryAspect.Fody

A Fody weaver which allows to decorate methods and hook into method start, method end and method exceptions.
MIT License
251 stars 75 forks source link

Issue66/invalid program exception #100

Closed psaxton closed 2 years ago

psaxton commented 2 years ago

Partially resolves #66: The original issue was caused with methods ending in a if-else block. Later reports show try-catch and try-finally blocks also result in an InvalidProgramException, but this apparently has a different cause and is reported on its own in #97.

I don't know how the maintainers want to continue to track the defects (close #66 and keep #97 open; keep #66 and close #97 as dup; etc.), but figured it is worth fixing at least this cause of the exception.

psaxton commented 2 years ago

Was able to verify and fix all reported sources of InvalidProgramException defects. This now fixes issue #97 as well.

Ralf1108 commented 2 years ago

Wow, great work @psaxton !!! Thank you very much!

I will trigger a prerelease nuget-package so the other guys can verify that their issues are solved!