mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-10 14:44:24 +00:00
Update debug logging for plugin fails
This commit is contained in:
parent
4fb0f96dc4
commit
d2d71494e3
1 changed files with 13 additions and 3 deletions
|
@ -28,7 +28,8 @@ namespace PKHeX.WinForms
|
|||
catch (Exception ex)
|
||||
#pragma warning restore CA1031 // Do not catch general exception types
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine($"Unable to load plugin [{t.Name}]: {t.FullName}", ex.Message);
|
||||
System.Diagnostics.Debug.WriteLine($"Unable to load plugin [{t.Name}]: {t.FullName}");
|
||||
System.Diagnostics.Debug.WriteLine(ex.Message);
|
||||
continue;
|
||||
}
|
||||
if (activate != null)
|
||||
|
@ -67,8 +68,17 @@ namespace PKHeX.WinForms
|
|||
catch (Exception ex)
|
||||
#pragma warning restore CA1031 // Do not catch general exception types
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine($"Unable to load plugin [{pluginType.Name}]: {z.FullName}", ex.Message);
|
||||
return Enumerable.Empty<Type>();
|
||||
System.Diagnostics.Debug.WriteLine($"Unable to load plugin [{pluginType.Name}]: {z.FullName}");
|
||||
System.Diagnostics.Debug.WriteLine(ex.Message);
|
||||
if (ex is ReflectionTypeLoadException rtle)
|
||||
{
|
||||
foreach (var le in rtle.LoaderExceptions)
|
||||
{
|
||||
if (le is not null)
|
||||
System.Diagnostics.Debug.WriteLine(le.Message);
|
||||
}
|
||||
}
|
||||
return Array.Empty<Type>();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue