diff options
| author | David Ullmer <daullmer@gmail.com> | 2021-01-24 00:57:37 +0100 |
|---|---|---|
| committer | David Ullmer <daullmer@gmail.com> | 2021-01-24 00:58:52 +0100 |
| commit | 4adbbb9f5111d2386f1f0a9c5aaa173d041e9c90 (patch) | |
| tree | e186eea6e38b4252a5ac9b0b831d14f4fe262a89 /Emby.Server.Implementations/Plugins/PluginManager.cs | |
| parent | 4aaf71b87383805df740703f4cf3714adf1f6dfd (diff) | |
Catch TypeLoadException during plugin loading
Diffstat (limited to 'Emby.Server.Implementations/Plugins/PluginManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Plugins/PluginManager.cs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Emby.Server.Implementations/Plugins/PluginManager.cs b/Emby.Server.Implementations/Plugins/PluginManager.cs index 9f597f3ef..42c76bd66 100644 --- a/Emby.Server.Implementations/Plugins/PluginManager.cs +++ b/Emby.Server.Implementations/Plugins/PluginManager.cs @@ -122,6 +122,12 @@ namespace Emby.Server.Implementations.Plugins ChangePluginState(plugin, PluginStatus.Malfunctioned); continue; } + catch (TypeLoadException ex) + { + _logger.LogError(ex, "Failed to load assembly {Path}. Disabling plugin. This is probably caused by an incompatible plugin version.", file); + ChangePluginState(plugin, PluginStatus.Malfunctioned); + continue; + } _logger.LogInformation("Loaded assembly {Assembly} from {Path}", assembly.FullName, file); yield return assembly; |
