From dc63d7fa25f9f4765939232d1f273322947ebf64 Mon Sep 17 00:00:00 2001 From: AeonLucid Date: Mon, 19 Oct 2020 12:16:36 +0200 Subject: [PATCH] Remove AmongUsException --- .../Exceptions/AmongUsException.cs | 27 ------------------- src/Impostor.Server/Net/State/Game.State.cs | 3 +-- 2 files changed, 1 insertion(+), 29 deletions(-) delete mode 100644 src/Impostor.Server/Exceptions/AmongUsException.cs diff --git a/src/Impostor.Server/Exceptions/AmongUsException.cs b/src/Impostor.Server/Exceptions/AmongUsException.cs deleted file mode 100644 index d6ace6c..0000000 --- a/src/Impostor.Server/Exceptions/AmongUsException.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace Impostor.Server.Exceptions -{ - public class AmongUsException : Exception - { - public AmongUsException() - { - } - - public AmongUsException(string message, Exception innerException) - : base(message, innerException) - { - } - - public AmongUsException(string message) - : base(message) - { - } - - protected AmongUsException(SerializationInfo info, StreamingContext context) - : base(info, context) - { - } - } -} \ No newline at end of file diff --git a/src/Impostor.Server/Net/State/Game.State.cs b/src/Impostor.Server/Net/State/Game.State.cs index fdca5d4..710e62f 100644 --- a/src/Impostor.Server/Net/State/Game.State.cs +++ b/src/Impostor.Server/Net/State/Game.State.cs @@ -1,7 +1,6 @@ using System.Linq; using System.Threading.Tasks; using Impostor.Server.Events; -using Impostor.Server.Exceptions; using Impostor.Server.Net.Messages; using Impostor.Shared.Innersloth.Data; @@ -14,7 +13,7 @@ namespace Impostor.Server.Net.State // Store player. if (!_players.TryAdd(player.Client.Id, player)) { - throw new AmongUsException("Failed to add player to game."); + throw new ImpostorException("Failed to add player to game."); } // Assign hostId if none is set. -- 2.39.5