From 4d87bfb11e2a2104410790611e4d0050f356c8e4 Mon Sep 17 00:00:00 2001 From: AeonLucid Date: Sun, 25 Oct 2020 22:28:40 +0100 Subject: [PATCH] PluginLoader warning instead of exception --- src/Impostor.Server/Plugins/PluginLoader.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Impostor.Server/Plugins/PluginLoader.cs b/src/Impostor.Server/Plugins/PluginLoader.cs index 404c05c..ef6dae6 100644 --- a/src/Impostor.Server/Plugins/PluginLoader.cs +++ b/src/Impostor.Server/Plugins/PluginLoader.cs @@ -74,7 +74,8 @@ namespace Impostor.Server.Plugins if (pluginStartup.Count > 1) { - throw new PluginLoaderException("A plugin may only define zero or one IPluginStartup implementation."); + Logger.Warning("A plugin may only define zero or one IPluginStartup implementation ({0}).", assembly); + continue; } // Find plugin. @@ -88,7 +89,8 @@ namespace Impostor.Server.Plugins if (plugin.Count != 1) { - throw new PluginLoaderException("A plugin must define exactly one IPlugin or PluginBase implementation."); + Logger.Warning("A plugin must define exactly one IPlugin or PluginBase implementation ({0}).", assembly); + continue; } // Save plugin. -- 2.39.5