Skip to content

Commit 45fbb4c

Browse files
chore: Throw in both faulted & canceled cases
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 11805f8 commit 45fbb4c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Uno.UI/Hosting/UnoPlatformHost.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ private async Task RunCore()
2020
public void Run()
2121
{
2222
var task = RunCore();
23-
if (task.IsFaulted)
23+
if (task.IsCompleted)
2424
{
2525
task.GetAwaiter().GetResult();
2626
}
27-
else if (!task.IsCompleted)
27+
else
2828
{
2929
throw new InvalidOperationException($"Running host {this} requires calling 'await host.RunAsync()' instead of 'host.Run()'.");
3030
}

0 commit comments

Comments
 (0)