Skip to content

Commit

Permalink
Removed task cancellation exception catching at the sprite level. We …
Browse files Browse the repository at this point in the history
…want exceptions so they bubble up and stop the logic altogether.
  • Loading branch information
vchelaru committed Nov 23, 2023
1 parent a45b908 commit 6e7526f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Engines/FlatRedBallXNA/FlatRedBall/Sprite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1788,11 +1788,12 @@ public async Task PlayAnimationsAsync(params string[] animations)
foreach(var animation in animations)
{
CurrentChainName = animation;
try
{
// This should not try/catch. If it does, then any caller will continue after it's finished, causing additional logic to run after a screen has ended:
//try
//{
await TimeManager.DelaySeconds(CurrentChain.TotalLength);
}
catch (TaskCanceledException) { return; }
//}
//catch (TaskCanceledException) { return; }
}
}

Expand Down

0 comments on commit 6e7526f

Please sign in to comment.