public void NestedTryCatchFinally()
{
TestModule ("catch.exe", module => {
var program = module.GetType ("Program");
var main = program.GetMethod ("Main");
Assert.IsNotNull (main);
AssertCode (@"
.locals ()
IL_0000: call System.Void Program::Foo()
IL_0005: leave.s IL_000d
IL_0007: call System.Void Program::Baz()
IL_000c: endfinally
IL_000d: leave.s IL_001f
IL_000f: pop
IL_0010: call System.Void Program::Bar()
IL_0015: leave.s IL_001f
IL_0017: pop
IL_0018: call System.Void Program::Bar()
IL_001d: leave.s IL_001f
IL_001f: leave.s IL_0027
IL_0021: call System.Void Program::Baz()
IL_0026: endfinally
IL_0027: ret
.try IL_0000 to IL_0007 finally handler IL_0007 to IL_000d
.try IL_0000 to IL_000f catch System.ArgumentException handler IL_000f to IL_0017
.try IL_0000 to IL_000f catch System.Exception handler IL_0017 to IL_001f
.try IL_0000 to IL_0021 finally handler IL_0021 to IL_0027
", main);
});
}