Enable RCS1236 and fix noncompliance
"Use exception filter" (`catch when`)
This commit is contained in:
parent
7df0cef0db
commit
002fb15db4
|
@ -462,6 +462,8 @@ dotnet_diagnostic.RCS1195.severity = warning
|
|||
dotnet_diagnostic.RCS1224.severity = warning
|
||||
# Add paragraph to documentation comment
|
||||
dotnet_diagnostic.RCS1226.severity = warning
|
||||
# Use exception filter
|
||||
dotnet_diagnostic.RCS1236.severity = warning
|
||||
# Do not pass non-read-only struct by read-only reference
|
||||
dotnet_diagnostic.RCS1242.severity = silent
|
||||
|
||||
|
|
|
@ -432,10 +432,9 @@ namespace BizHawk.Client.Common
|
|||
{
|
||||
return core.Create(cip);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Exception e) when (!_config.DontTryOtherCores
|
||||
&& e is not (MissingFirmwareException or { InnerException: MissingFirmwareException }))
|
||||
{
|
||||
if (_config.DontTryOtherCores || e is MissingFirmwareException || e.InnerException is MissingFirmwareException)
|
||||
throw;
|
||||
exceptions.Add(e);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -276,14 +276,15 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
Directory.CreateDirectory(movieFolderPath);
|
||||
}
|
||||
catch (Exception movieDirException)
|
||||
catch (IOException)
|
||||
{
|
||||
if (movieDirException is IOException
|
||||
|| movieDirException is UnauthorizedAccessException)
|
||||
{
|
||||
//TO DO : Pass error to user?
|
||||
}
|
||||
else throw;
|
||||
// ignored
|
||||
//TODO present to user?
|
||||
}
|
||||
catch (UnauthorizedAccessException)
|
||||
{
|
||||
// ignored
|
||||
//TODO present to user?
|
||||
}
|
||||
|
||||
var filterset = _movieSession.Movie.GetFSFilterSet();
|
||||
|
|
Loading…
Reference in New Issue