mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-26 22:10:21 +00:00
Bump winforms proj c# lang to 10
no functional change
This commit is contained in:
parent
bee4a54148
commit
4b8adfe28d
3 changed files with 1 additions and 9 deletions
|
@ -524,9 +524,7 @@ namespace PKHeX.WinForms
|
|||
OpenFile(input, path, ext);
|
||||
#else
|
||||
try { OpenFile(input, path, ext); }
|
||||
#pragma warning disable CA1031 // Do not catch general exception types
|
||||
catch (Exception e) { WinFormsUtil.Error(MsgFileLoadFail + "\nPath: " + path, e); }
|
||||
#pragma warning restore CA1031 // Do not catch general exception types
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<StartupObject>PKHeX.WinForms.Program</StartupObject>
|
||||
<AssemblyName>PKHeX</AssemblyName>
|
||||
<Version>22.01.01</Version>
|
||||
<LangVersion>9</LangVersion>
|
||||
<LangVersion>10</LangVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
|
@ -51,9 +51,7 @@ namespace PKHeX.WinForms
|
|||
{
|
||||
result = ErrorWindow.ShowErrorDialog("An unhandled exception has occurred.\nYou can continue running PKHeX, but please report this error.", t.Exception, true);
|
||||
}
|
||||
#pragma warning disable CA1031 // Do not catch general exception types
|
||||
catch (Exception reportingException)
|
||||
#pragma warning restore CA1031 // Do not catch general exception types
|
||||
{
|
||||
HandleReportingException(t.Exception, reportingException);
|
||||
}
|
||||
|
@ -85,9 +83,7 @@ namespace PKHeX.WinForms
|
|||
Error("A fatal non-UI error has occurred in PKHeX, and the details could not be displayed. Please report this to the author.");
|
||||
}
|
||||
}
|
||||
#pragma warning disable CA1031 // Do not catch general exception types
|
||||
catch (Exception reportingException)
|
||||
#pragma warning restore CA1031 // Do not catch general exception types
|
||||
{
|
||||
HandleReportingException(ex, reportingException);
|
||||
}
|
||||
|
@ -124,9 +120,7 @@ namespace PKHeX.WinForms
|
|||
var message = (originalException?.ToString() ?? "null first exception") + Environment.NewLine + errorHandlingException;
|
||||
File.WriteAllText($"PKHeX_Error_Report {DateTime.Now:yyyyMMddHHmmss}.txt", message);
|
||||
}
|
||||
#pragma warning disable CA1031 // Do not catch general exception types
|
||||
catch (Exception)
|
||||
#pragma warning restore CA1031 // Do not catch general exception types
|
||||
{
|
||||
// We've failed to save the error details twice now. There's nothing else we can do.
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue