Пример #1
0
 public static CoroutineException MakeException <IterationType>(CoroutineException innerGraphException, IEnumerator <IterationType> newFrameIterator)
 {
     using (AssemblyCache cache = new AssemblyCache())
     {
         return(new CoroutineException(innerGraphException, Frame.MakeFrame(cache, newFrameIterator)));
     }
 }
Пример #2
0
            /// <summary>
            /// Initializing constructor - parses the original exception and matches it up with the graph info passed in
            /// </summary>
            public CoroutineException(CoroutineException innerGraphException, Frame newFrame)
                : base(innerGraphException.Message)
            {
                var frames = new List <Frame>(innerGraphException.Trace.Frames);

                frames.Add(newFrame);
                _Trace = new Trace(frames);
            }
Пример #3
0
        IEnumerator StartCoroutineInternal(IEnumerator coroutine)
        {
            while (true)
            {
                try
                {
                    if (!coroutine.MoveNext())
                        yield break;
                }
                catch (Exception e)
                {
                    string message = "Coroutine Exception: " + e.Message;

                    CoroutineException error = new CoroutineException(message, e);

                    Debug.LogException(error);

                    yield break;
                }

                yield return coroutine.Current;
            }
	    }