mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-15 05:04:15 +01:00
Merge pull request #261 from Aireil/add_loaderexceptions
Log LoaderException exceptions when loading plugins
This commit is contained in:
commit
32a72e41f9
2 changed files with 15 additions and 4 deletions
|
|
@ -104,6 +104,11 @@ namespace Dalamud.Plugin
|
||||||
}
|
}
|
||||||
catch (Exception ex) {
|
catch (Exception ex) {
|
||||||
Log.Error(ex, $"Plugin load for {dllFile.FullName} failed.");
|
Log.Error(ex, $"Plugin load for {dllFile.FullName} failed.");
|
||||||
|
if (ex is ReflectionTypeLoadException typeLoadException) {
|
||||||
|
foreach (var exception in typeLoadException.LoaderExceptions) {
|
||||||
|
Log.Error(exception, "LoaderException:");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ using System.IO;
|
||||||
using System.IO.Compression;
|
using System.IO.Compression;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using CheapLoc;
|
using CheapLoc;
|
||||||
|
|
@ -149,8 +150,13 @@ namespace Dalamud.Plugin
|
||||||
|
|
||||||
return this.dalamud.PluginManager.LoadPluginFromAssembly(dllFile, false, PluginLoadReason.Installer);
|
return this.dalamud.PluginManager.LoadPluginFromAssembly(dllFile, false, PluginLoadReason.Installer);
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception ex) {
|
||||||
Log.Error(e, "Plugin download failed hard.");
|
Log.Error(ex, "Plugin download failed hard.");
|
||||||
|
if (ex is ReflectionTypeLoadException typeLoadException) {
|
||||||
|
foreach (var exception in typeLoadException.LoaderExceptions) {
|
||||||
|
Log.Error(exception, "LoaderException:");
|
||||||
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -287,8 +293,8 @@ namespace Dalamud.Plugin
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception ex) {
|
||||||
Log.Error(e, "Plugin update failed.");
|
Log.Error(ex, "Plugin update failed.");
|
||||||
hasError = true;
|
hasError = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue