chore: added throwing task exception when faulted on WaitForTaskYield
This commit is contained in:
@@ -14,7 +14,7 @@ public class WaitForTaskYield(Task task, TaskCompletionStatus completionStatus =
|
||||
if (task.IsCanceled)
|
||||
throw new("Task has been canceled.");
|
||||
if (task.IsFaulted)
|
||||
throw new("Task has faulted.");
|
||||
throw task.Exception ?? new("Task has faulted.");
|
||||
return task.IsCompletedSuccessfully;
|
||||
|
||||
case TaskCompletionStatus.Failed:
|
||||
|
||||
Reference in New Issue
Block a user