mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-15 13:14:17 +01:00
Simplify casting of ReflectionTypeLoadException
This commit is contained in:
parent
34a1eb0b9c
commit
2e4f11b2ad
2 changed files with 2 additions and 4 deletions
|
|
@ -104,8 +104,7 @@ 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) {
|
if (ex is ReflectionTypeLoadException typeLoadException) {
|
||||||
var typeLoadException = ex as ReflectionTypeLoadException;
|
|
||||||
foreach (var exception in typeLoadException.LoaderExceptions) {
|
foreach (var exception in typeLoadException.LoaderExceptions) {
|
||||||
Log.Error(exception, "LoaderException:");
|
Log.Error(exception, "LoaderException:");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -152,8 +152,7 @@ namespace Dalamud.Plugin
|
||||||
}
|
}
|
||||||
catch (Exception ex) {
|
catch (Exception ex) {
|
||||||
Log.Error(ex, "Plugin download failed hard.");
|
Log.Error(ex, "Plugin download failed hard.");
|
||||||
if (ex is ReflectionTypeLoadException) {
|
if (ex is ReflectionTypeLoadException typeLoadException) {
|
||||||
var typeLoadException = ex as ReflectionTypeLoadException;
|
|
||||||
foreach (var exception in typeLoadException.LoaderExceptions) {
|
foreach (var exception in typeLoadException.LoaderExceptions) {
|
||||||
Log.Error(exception, "LoaderException:");
|
Log.Error(exception, "LoaderException:");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue