@ -112,19 +112,20 @@ namespace Emby.Server.Implementations.Plugins
{
assembly = Assembly . LoadFrom ( file ) ;
// This force loads all reference dll's that the plugin uses in the try..catch block.
// Removing this will cause JF to bomb out if referenced dll's cause issues.
try
{
assembly . GetExportedTypes ( ) ;
}
catch ( FileLoadException ex )
catch ( TypeLoadException ex ) // Undocumented exception
{
_logger . LogError ( ex , "Failed to load assembly {Path} . Disabling plugin.", file ) ;
ChangePluginState ( plugin , PluginStatus . Malfunction ed) ;
_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 . NotSupport ed) ;
continue ;
}
catch ( TypeLoadException ex )
}
catch ( FileLoadException ex )
{
_logger . LogError ( ex , "Failed to load assembly {Path}. Disabling plugin. This is probably caused by an incompatible plugin version. ", file ) ;
_logger . LogError ( ex , "Failed to load assembly {Path}. Disabling plugin. ", file ) ;
ChangePluginState ( plugin , PluginStatus . Malfunctioned ) ;
continue ;
}