protected T machine_initializer;
int resume_pc;
ExceptionStatement inside_try_block;
+ TryCatch inside_catch_block;
protected YieldStatement (Expression expr, Location l)
{
machine_initializer = bc.CurrentAnonymousMethod as T;
inside_try_block = bc.CurrentTryBlock;
+ inside_catch_block = bc.CurrentTryCatch;
return true;
}
if (inside_try_block == null) {
resume_pc = machine_initializer.AddResumePoint (this);
} else {
- resume_pc = inside_try_block.AddResumePoint (this, resume_pc, machine_initializer);
+ resume_pc = inside_try_block.AddResumePoint (this, resume_pc, machine_initializer, inside_catch_block);
unwind_protect = true;
inside_try_block = null;
}