Skip to content

Commit

Permalink
Don't swallow ArgumentOutOfRangeException
Browse files Browse the repository at this point in the history
todo: determine why monogame throws this so frequently when changing states
  • Loading branch information
ethanmoffat committed Jun 9, 2022
1 parent a73a218 commit 0c0b667
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions EndlessClient/GameExecution/EndlessGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ protected override void Initialize()

Components.ComponentRemoved += (o, e) =>
{
if (e.GameComponent is PacketHandlerGameComponent)
{
throw new InvalidOperationException("Packet handler game component should never be removed from Game components");
}
//if (e.GameComponent is PacketHandlerGameComponent)
//{
// throw new InvalidOperationException("Packet handler game component should never be removed from Game components");
//}
};

base.Initialize();
Expand Down Expand Up @@ -185,9 +185,6 @@ protected override void Update(GameTime gameTime)
{
// hide "failed to compare two elements in the array" error from Monogame
}
catch (ArgumentOutOfRangeException)
{
}
}

#endif
Expand Down

0 comments on commit 0c0b667

Please sign in to comment.