]> git.deb.at Git - rhonda/impostor.git/commitdiff
Rethrow cheat exceptions thrown by plugins
authorAeonLucid <aeonlucid@outlook.com>
Mon, 26 Oct 2020 21:32:56 +0000 (22:32 +0100)
committerAeonLucid <aeonlucid@outlook.com>
Mon, 26 Oct 2020 21:33:04 +0000 (22:33 +0100)
src/Impostor.Server/Events/EventManager.cs

index cb5866b747c26bc692aed502eba4c52a64e41d37..10c3ec892517b91dfcd74241b86173937fb0662c 100644 (file)
@@ -4,6 +4,7 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Reflection;
 using System.Threading.Tasks;
+using Impostor.Api;
 using Impostor.Api.Events;
 using Impostor.Api.Events.Managers;
 using Impostor.Server.Events.Register;
@@ -75,6 +76,10 @@ namespace Impostor.Server.Events
                     await eventListener.InvokeAsync(handler, @event, _serviceProvider);
                 }
             }
+            catch (ImpostorCheatException)
+            {
+                throw;
+            }
             catch (Exception e)
             {
                 _logger.LogError(e, "Invocation of event {0} threw an exception.", @event.GetType().Name);