diff --git a/Dalamud/Plugin/PluginManager.cs b/Dalamud/Plugin/PluginManager.cs index 221c30c59..123562b95 100644 --- a/Dalamud/Plugin/PluginManager.cs +++ b/Dalamud/Plugin/PluginManager.cs @@ -104,6 +104,11 @@ namespace Dalamud.Plugin } catch (Exception ex) { Log.Error(ex, $"Plugin load for {dllFile.FullName} failed."); + if (ex is ReflectionTypeLoadException typeLoadException) { + foreach (var exception in typeLoadException.LoaderExceptions) { + Log.Error(exception, "LoaderException:"); + } + } } } } diff --git a/Dalamud/Plugin/PluginRepository.cs b/Dalamud/Plugin/PluginRepository.cs index 7a8733af1..d56c43ca0 100644 --- a/Dalamud/Plugin/PluginRepository.cs +++ b/Dalamud/Plugin/PluginRepository.cs @@ -6,6 +6,7 @@ using System.IO; using System.IO.Compression; using System.Linq; using System.Net; +using System.Reflection; using System.Text; using System.Threading.Tasks; using CheapLoc; @@ -149,8 +150,13 @@ namespace Dalamud.Plugin return this.dalamud.PluginManager.LoadPluginFromAssembly(dllFile, false, PluginLoadReason.Installer); } - catch (Exception e) { - Log.Error(e, "Plugin download failed hard."); + catch (Exception ex) { + Log.Error(ex, "Plugin download failed hard."); + if (ex is ReflectionTypeLoadException typeLoadException) { + foreach (var exception in typeLoadException.LoaderExceptions) { + Log.Error(exception, "LoaderException:"); + } + } return false; } } @@ -287,8 +293,8 @@ namespace Dalamud.Plugin } } } - catch (Exception e) { - Log.Error(e, "Plugin update failed."); + catch (Exception ex) { + Log.Error(ex, "Plugin update failed."); hasError = true; }