mirror of https://github.com/Cysharp/UniTask
Compare commits
2 Commits
e03544e1ae
...
eb91abcee3
Author | SHA1 | Date |
---|---|---|
|
eb91abcee3 | |
|
2d674999f0 |
|
@ -28,7 +28,7 @@ namespace Cysharp.Threading.Tasks
|
|||
p.TrySetCanceled();
|
||||
break;
|
||||
case TaskStatus.Faulted:
|
||||
p.TrySetException(x.Exception.InnerException);
|
||||
p.TrySetException(x.Exception.InnerExceptions.Count == 1 ? x.Exception.InnerException : x.Exception);
|
||||
break;
|
||||
case TaskStatus.RanToCompletion:
|
||||
p.TrySetResult(x.Result);
|
||||
|
@ -58,7 +58,7 @@ namespace Cysharp.Threading.Tasks
|
|||
p.TrySetCanceled();
|
||||
break;
|
||||
case TaskStatus.Faulted:
|
||||
p.TrySetException(x.Exception.InnerException);
|
||||
p.TrySetException(x.Exception.InnerExceptions.Count == 1 ? x.Exception.InnerException : x.Exception);
|
||||
break;
|
||||
case TaskStatus.RanToCompletion:
|
||||
p.TrySetResult();
|
||||
|
|
Loading…
Reference in New Issue