public IEnumerable <IInstruction> Rethrow(ISehBlock block) { var ci = block.GetCatchInfo(); var code = new AbcCode(_abc); code.GetLocal(ci.ExceptionVar); KillExceptionVariable(code, ci); code.Throw(); return(code); }
public static SehHandlerInfo GetHandlerInfo(this ISehBlock block) { var handlerInfo = block.Tag as SehHandlerInfo; if (handlerInfo == null) { throw new InvalidOperationException("Handler info is not set yet!"); } return(handlerInfo); }
public static CatchInfo GetCatchInfo(this ISehBlock block) { var handlerInfo = GetHandlerInfo(block); var info = handlerInfo.CatchInfo; if (info == null) { throw new InvalidOperationException("Catch info is not set."); } return(info); }
public IEnumerable <IInstruction> Rethrow(ISehBlock block) { return(NopArray); }