]> git.deb.at Git - rhonda/impostor.git/commitdiff
PluginLoader warning instead of exception
authorAeonLucid <aeonlucid@outlook.com>
Sun, 25 Oct 2020 21:28:40 +0000 (22:28 +0100)
committerAeonLucid <aeonlucid@outlook.com>
Sun, 25 Oct 2020 21:28:40 +0000 (22:28 +0100)
src/Impostor.Server/Plugins/PluginLoader.cs

index 404c05ccb287bae04db9a1144c762e55d8035133..ef6dae6729364f8c3fb80b9752b4915520dc3e15 100644 (file)
@@ -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.