mirror of
https://github.com/Cysharp/UniTask.git
synced 2026-05-26 10:00:23 +00:00
ToCoroutine throws exception when error detected
This commit is contained in:
@@ -621,9 +621,8 @@ namespace Cysharp.Threading.Tasks
|
|||||||
|
|
||||||
if (exception != null)
|
if (exception != null)
|
||||||
{
|
{
|
||||||
// throw exception on iterator (main)thread.
|
exception.Throw();
|
||||||
// unfortunately unity test-runner can not handle throw exception on hand-write IEnumerator.MoveNext.
|
return false;
|
||||||
UnityEngine.Debug.LogException(exception.SourceException);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return !completed;
|
return !completed;
|
||||||
@@ -692,9 +691,8 @@ namespace Cysharp.Threading.Tasks
|
|||||||
|
|
||||||
if (exception != null)
|
if (exception != null)
|
||||||
{
|
{
|
||||||
// throw exception on iterator (main)thread.
|
exception.Throw();
|
||||||
// unfortunately unity test-runner can not handle throw exception on hand-write IEnumerator.MoveNext.
|
return false;
|
||||||
UnityEngine.Debug.LogException(exception.SourceException);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return !completed;
|
return !completed;
|
||||||
|
|||||||
Reference in New Issue
Block a user