mirror of
https://github.com/Cysharp/UniTask.git
synced 2026-05-27 02:40:08 +00:00
Fix TimeoutWithoutException does not suppress exception
This commit is contained in:
@@ -315,7 +315,7 @@ namespace Cysharp.Threading.Tasks
|
|||||||
taskCancellationTokenSource.Dispose();
|
taskCancellationTokenSource.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new TimeoutException("Exceed Timeout:" + timeout);
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -325,7 +325,7 @@ namespace Cysharp.Threading.Tasks
|
|||||||
|
|
||||||
if (taskResultIsCanceled)
|
if (taskResultIsCanceled)
|
||||||
{
|
{
|
||||||
Error.ThrowOperationCanceledException();
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@@ -361,7 +361,7 @@ namespace Cysharp.Threading.Tasks
|
|||||||
taskCancellationTokenSource.Dispose();
|
taskCancellationTokenSource.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new TimeoutException("Exceed Timeout:" + timeout);
|
return (true, default);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -371,7 +371,7 @@ namespace Cysharp.Threading.Tasks
|
|||||||
|
|
||||||
if (taskResult.IsCanceled)
|
if (taskResult.IsCanceled)
|
||||||
{
|
{
|
||||||
Error.ThrowOperationCanceledException();
|
return (true, default);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (false, taskResult.Result);
|
return (false, taskResult.Result);
|
||||||
|
|||||||
Reference in New Issue
Block a user