[Mono-list] Better feedback from InvalidProgramException

Chris Seaton chris at chrisseaton.com
Mon Mar 19 09:45:25 EDT 2007


Hi,

I'm using reflection.emit and dynamic method to emit code at runtime.  
Sometimes I have errors in the code I emit, but the only feedback I  
get is InvalidProgramException with an IL offset. Is there any way to  
find out what is wrong when I get these errors? If I get something like

IL_0585: call      0x000000ed

Mono must know what was wrong to throw the exception. Not enough on  
the stack for example? Is there any way to get it to give me more  
information? Is there any way to easily work out where in my code  
IL_0585 was emitted?

Thanks

Chris Seaton



More information about the Mono-list mailing list