pull/61/head
neuecc 2020-05-22 17:15:36 +09:00
parent 1d88ed85bc
commit 78f56b9b33
1 changed files with 8 additions and 1 deletions

View File

@ -123,7 +123,14 @@ namespace Cysharp.Threading.Tasks
{
// setup result
this.hasUnhandledError = true;
this.error = ExceptionDispatchInfo.Capture(error);
if (error is OperationCanceledException)
{
this.error = error;
}
else
{
this.error = ExceptionDispatchInfo.Capture(error);
}
if (continuation != null || Interlocked.CompareExchange(ref this.continuation, UniTaskCompletionSourceCoreShared.s_sentinel, null) != null)
{