From: AeonLucid Date: Mon, 19 Oct 2020 10:16:36 +0000 (+0200) Subject: Remove AmongUsException X-Git-Tag: v1.2.2~96^2~71 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=dc63d7fa25f9f4765939232d1f273322947ebf64;p=rhonda%2Fimpostor.git Remove AmongUsException --- 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.