mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-05 21:37:10 -04:00
Change plugin error message
This commit is contained in:
parent
4adbbb9f51
commit
80f3e20394
@ -112,9 +112,16 @@ namespace Emby.Server.Implementations.Plugins
|
|||||||
{
|
{
|
||||||
assembly = Assembly.LoadFrom(file);
|
assembly = Assembly.LoadFrom(file);
|
||||||
|
|
||||||
// This force loads all reference dll's that the plugin uses in the try..catch block.
|
try
|
||||||
// Removing this will cause JF to bomb out if referenced dll's cause issues.
|
{
|
||||||
assembly.GetExportedTypes();
|
assembly.GetExportedTypes();
|
||||||
|
}
|
||||||
|
catch (TypeLoadException ex) // Undocumented exception
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Failed to load assembly {Path}. This error occurs when a plugin references an incompatible version of one of the shared libraries. Disabling plugin.", file);
|
||||||
|
ChangePluginState(plugin, PluginStatus.NotSupported);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (FileLoadException ex)
|
catch (FileLoadException ex)
|
||||||
{
|
{
|
||||||
@ -122,12 +129,6 @@ namespace Emby.Server.Implementations.Plugins
|
|||||||
ChangePluginState(plugin, PluginStatus.Malfunctioned);
|
ChangePluginState(plugin, PluginStatus.Malfunctioned);
|
||||||
continue;
|
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);
|
_logger.LogInformation("Loaded assembly {Assembly} from {Path}", assembly.FullName, file);
|
||||||
yield return assembly;
|
yield return assembly;
|
||||||
|
Loading…
Reference in New Issue
Block a user