mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 02:36:19 +02:00
[NetAnalyzers]CA1031 suppressions cleanup (#18706)
This commit is contained in:
committed by
GitHub
parent
33072c7ee3
commit
b33bc2ecd0
@@ -117,7 +117,6 @@ namespace Wox.Infrastructure.Exception
|
||||
}
|
||||
|
||||
// http://msdn.microsoft.com/en-us/library/hh925568%28v=vs.110%29.aspx
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "Suppressing this to enable FxCop. We are logging the exception, and going forward general exceptions should not be caught")]
|
||||
private static List<string> GetFrameworkVersionFromRegistry()
|
||||
{
|
||||
try
|
||||
|
||||
@@ -94,7 +94,6 @@ namespace Wox.Infrastructure
|
||||
}
|
||||
|
||||
// Function to run as admin for context menu items
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "Suppressing this to enable FxCop. We are logging the exception, and going forward general exceptions should not be caught")]
|
||||
public static void RunAsAdmin(string path)
|
||||
{
|
||||
var info = new ProcessStartInfo
|
||||
@@ -116,7 +115,6 @@ namespace Wox.Infrastructure
|
||||
}
|
||||
|
||||
// Function to run as other user for context menu items
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "Suppressing this to enable FxCop. We are logging the exception, and going forward general exceptions should not be caught")]
|
||||
public static void RunAsUser(string path)
|
||||
{
|
||||
var info = new ProcessStartInfo
|
||||
|
||||
@@ -14,7 +14,6 @@ namespace Wox.Infrastructure.Image
|
||||
{
|
||||
public class ImageHashGenerator : IImageHashGenerator
|
||||
{
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "Suppressing this to enable FxCop. We are logging the exception, and going forward general exceptions should not be caught")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Security", "CA5350:Do Not Use Weak Cryptographic Algorithms", Justification = "Level of protection needed for the image data does not require a security guarantee")]
|
||||
public string GetHashFromImage(ImageSource image)
|
||||
{
|
||||
|
||||
@@ -119,7 +119,6 @@ namespace Wox.Infrastructure.Image
|
||||
Cache,
|
||||
}
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "Suppressing this to enable FxCop. We are logging the exception, and going forward general exceptions should not be caught")]
|
||||
private static ImageResult LoadInternal(string path, bool loadFullImage = false)
|
||||
{
|
||||
ImageSource image;
|
||||
|
||||
@@ -86,7 +86,6 @@ namespace Wox.Infrastructure.Storage
|
||||
}
|
||||
}
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "Suppressing this to enable FxCop. We are logging the exception, and going forward general exceptions should not be caught")]
|
||||
private T Deserialize(Stream stream, T defaultData)
|
||||
{
|
||||
// http://stackoverflow.com/questions/2120055/binaryformatter-deserialize-gives-serializationexception
|
||||
|
||||
Reference in New Issue
Block a user