aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Plugins/PluginManager.cs
diff options
context:
space:
mode:
authorDavid Ullmer <daullmer@gmail.com>2021-01-25 09:44:06 +0100
committerGitHub <noreply@github.com>2021-01-25 09:44:06 +0100
commitb014f2309d546779d7e9530daa1ddd55741cbb32 (patch)
tree00198a24189f861481bb42a02e5990e16417a94f /Emby.Server.Implementations/Plugins/PluginManager.cs
parent677bba742e343271be39d4da6d10eca9720c0403 (diff)
Update Emby.Server.Implementations/Plugins/PluginManager.cs
Co-authored-by: Claus Vium <cvium@users.noreply.github.com>
Diffstat (limited to 'Emby.Server.Implementations/Plugins/PluginManager.cs')
-rw-r--r--Emby.Server.Implementations/Plugins/PluginManager.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/Emby.Server.Implementations/Plugins/PluginManager.cs b/Emby.Server.Implementations/Plugins/PluginManager.cs
index de4b71433..adf62124a 100644
--- a/Emby.Server.Implementations/Plugins/PluginManager.cs
+++ b/Emby.Server.Implementations/Plugins/PluginManager.cs
@@ -126,6 +126,14 @@ namespace Emby.Server.Implementations.Plugins
ChangePluginState(plugin, PluginStatus.NotSupported);
continue;
}
+#pragma warning disable CA1031 // Do not catch general exception types
+ catch (Exception ex)
+#pragma warning restore CA1031 // Do not catch general exception types
+ {
+ _logger.LogError(ex, "Failed to load assembly {Path}. Unknown exception was thrown. Disabling plugin.", file);
+ ChangePluginState(plugin, PluginStatus.Malfunctioned);
+ continue;
+ }
_logger.LogInformation("Loaded assembly {Assembly} from {Path}", assembly.FullName, file);
yield return assembly;