Miista / pose

Replace any .NET method (including static and non-virtual) with a delegate
MIT License
26 stars 3 forks source link

Exception filters are not supported in .NET Framework 4.7 and 4.8 #45

Open Miista opened 8 months ago

Miista commented 8 months ago

Stack trace:

The requested operation is invalid for DynamicMethod.
   at System.Reflection.Emit.DynamicILGenerator.BeginExceptFilterBlock()
   at Pose.IL.MethodRewriter.EmitILForExceptionHandlers(ILGenerator ilGenerator, Instruction instruction, IReadOnlyCollection`1 handlers)

As per the documentation it should be possible to implement this using DynamicILInfo.

This issue was found during work on Miista/pose#34