Added referenced assembly failure detection, and DI failure protection.
This commit is contained in:
parent
dbfbf9fb5b
commit
149c2b2169
|
@ -413,6 +413,8 @@ namespace Emby.Server.Implementations
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Logger.LogError(ex, "Error creating {Type}", type);
|
Logger.LogError(ex, "Error creating {Type}", type);
|
||||||
|
// If this is a plugin fail it.
|
||||||
|
_pluginManager.FailPlugin(type.Assembly);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
|
|
|
@ -111,6 +111,10 @@ namespace Emby.Server.Implementations.Plugins
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
assembly = Assembly.LoadFrom(file);
|
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.
|
||||||
|
assembly.GetExportedTypes();
|
||||||
}
|
}
|
||||||
catch (FileLoadException ex)
|
catch (FileLoadException ex)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user