protected virtual void Update() { if (!processingYieldInstruction) { if (enumeratorExecutor != null) { if (enumeratorExecutor.IsNotCompleted) { YieldInstruction yieldInstruction = null; try { yieldInstruction = enumeratorExecutor.MoveNext(); } catch (Exception ex) { if (ex is CoroutineException) { string result = ClassFileFinder.FindStackTrace(className, methodName, enumeratorExecutor.YieldInstructionIndex); throw new Exception(result, ex.InnerException); } throw ex; } if (yieldInstruction != null) { StartCoroutine(ProcessYieldInstruction(yieldInstruction)); } } else { StopTestCoroutine(); } } } }
private YieldInstruction SafeMoveNext(CoroutinerExecutorBase coroutinerExecutorBase) { try { return(coroutinerExecutorBase.MoveNext()); } catch (Exception e) { if (e is CoroutineException) { throw e; } throw new CoroutineException(e); } }