ToCoroutine throws exception when error detected

master
neuecc 2020-06-09 11:26:03 +09:00
parent 0c33977f5a
commit 7289fe6e25
1 changed files with 4 additions and 6 deletions

View File

@ -621,9 +621,8 @@ namespace Cysharp.Threading.Tasks
if (exception != null)
{
// throw exception on iterator (main)thread.
// unfortunately unity test-runner can not handle throw exception on hand-write IEnumerator.MoveNext.
UnityEngine.Debug.LogException(exception.SourceException);
exception.Throw();
return false;
}
return !completed;
@ -692,9 +691,8 @@ namespace Cysharp.Threading.Tasks
if (exception != null)
{
// throw exception on iterator (main)thread.
// unfortunately unity test-runner can not handle throw exception on hand-write IEnumerator.MoveNext.
UnityEngine.Debug.LogException(exception.SourceException);
exception.Throw();
return false;
}
return !completed;