mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-13 23:50:25 -05:00
Catch any exception, show message in result
This commit is contained in:
parent
d66c406751
commit
3b4fd49af9
|
|
@ -740,10 +740,15 @@ public static bool GetSavesFromFolder(string folderPath, bool deep, out IEnumera
|
|||
return true;
|
||||
}
|
||||
#pragma warning disable CA1031 // Do not catch general exception types
|
||||
catch (ArgumentException)
|
||||
catch (Exception ex)
|
||||
#pragma warning restore CA1031 // Do not catch general exception types
|
||||
{
|
||||
result = new[] { MsgFileLoadFailAuto + Environment.NewLine + folderPath, MsgFileLoadFailAutoAdvise + Environment.NewLine + MsgFileLoadFailAutoCause };
|
||||
result = new[]
|
||||
{
|
||||
MsgFileLoadFailAuto + Environment.NewLine + folderPath,
|
||||
MsgFileLoadFailAutoAdvise + Environment.NewLine + MsgFileLoadFailAutoCause,
|
||||
ex.Message,
|
||||
};
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user