+++ /dev/null
-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
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;
// 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.