Remove AmongUsException

This commit is contained in:
AeonLucid committed 2020-10-19 12:16:36 +02:00
1 parent d44224a91c
commit dc63d7fa25
2 files changed
+1 -29

No files matched your search

@@ -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)
{
}
}
}
+1 -2
View File
@@ -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.