You can try to make your Main() method more robust to catch (and throw) an exception ... so> .
Often the problem is that too much code gets into the outermost Main() method. JIT should be able to fully understand Main() , otherwise none of your code might work. By making Main() simpler, you have a chance. In a related example, if MainCore() fails: excellent, we can still catch the exception in Main() .
This works because JIT is executed by method by method ... i.e. MainCore() not JIT until it is called, and by this time we already have our try / catch.
Marc gravell
source share