mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +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) {
|
||||
Log.Error(ex, $"Plugin load for {dllFile.FullName} failed.");
|
||||
if (ex is ReflectionTypeLoadException) {
|
||||
var typeLoadException = ex as ReflectionTypeLoadException;
|
||||
if (ex is ReflectionTypeLoadException typeLoadException) {
|
||||
foreach (var exception in typeLoadException.LoaderExceptions) {
|
||||
Log.Error(exception, "LoaderException:");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -152,8 +152,7 @@ namespace Dalamud.Plugin
|
|||
}
|
||||
catch (Exception ex) {
|
||||
Log.Error(ex, "Plugin download failed hard.");
|
||||
if (ex is ReflectionTypeLoadException) {
|
||||
var typeLoadException = ex as ReflectionTypeLoadException;
|
||||
if (ex is ReflectionTypeLoadException typeLoadException) {
|
||||
foreach (var exception in typeLoadException.LoaderExceptions) {
|
||||
Log.Error(exception, "LoaderException:");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue