Add check to that innerException is empty
parent
62a2a2e8f9
commit
90c81613ac
|
@ -28,7 +28,7 @@ namespace Cysharp.Threading.Tasks
|
|||
p.TrySetCanceled();
|
||||
break;
|
||||
case TaskStatus.Faulted:
|
||||
p.TrySetException(x.Exception.InnerException);
|
||||
p.TrySetException(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.InnerException ?? x.Exception);
|
||||
break;
|
||||
case TaskStatus.RanToCompletion:
|
||||
p.TrySetResult();
|
||||
|
|
Loading…
Reference in New Issue