From c65ae8d18ec10fb387f5ac189cdb133b008a3f78 Mon Sep 17 00:00:00 2001 From: neuecc Date: Sat, 4 Jul 2020 06:29:08 +0900 Subject: [PATCH] error detail --- .../Assets/Plugins/UniTask/Runtime/UniTaskCompletionSource.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/UniTask/Assets/Plugins/UniTask/Runtime/UniTaskCompletionSource.cs b/src/UniTask/Assets/Plugins/UniTask/Runtime/UniTaskCompletionSource.cs index 70f804d..30ffd87 100644 --- a/src/UniTask/Assets/Plugins/UniTask/Runtime/UniTaskCompletionSource.cs +++ b/src/UniTask/Assets/Plugins/UniTask/Runtime/UniTaskCompletionSource.cs @@ -229,7 +229,7 @@ namespace Cysharp.Threading.Tasks ValidateToken(token); if (completedCount == 0) { - throw new InvalidOperationException("not yet completed."); + throw new InvalidOperationException("Not yet completed, UniTask only allow to use await."); } if (error != null) @@ -288,7 +288,7 @@ namespace Cysharp.Threading.Tasks // It will cause call OnCompleted multiple time, invalid. if (!ReferenceEquals(oldContinuation, UniTaskCompletionSourceCoreShared.s_sentinel)) { - throw new InvalidOperationException(); + throw new InvalidOperationException("Already continuation registered, can not await twice or get Status after await."); } continuation(state);