mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 19:26:39 +02:00
[NetAnalyzers]CA1031 suppressions cleanup (#18706)
This commit is contained in:
committed by
GitHub
parent
33072c7ee3
commit
b33bc2ecd0
@@ -36,7 +36,6 @@ namespace Microsoft.Plugin.Indexer
|
||||
_context = context;
|
||||
}
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "We want to keep the process alive, and instead log and show an error message")]
|
||||
public List<ContextMenuResult> LoadContextMenus(Result selectedResult)
|
||||
{
|
||||
var contextMenus = new List<ContextMenuResult>();
|
||||
@@ -119,7 +118,6 @@ namespace Microsoft.Plugin.Indexer
|
||||
}
|
||||
|
||||
// Function to add the context menu item to run as admin
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "We want to keep the process alive, and instead log the exception message")]
|
||||
private static ContextMenuResult CreateRunAsAdminContextMenu(SearchResult record)
|
||||
{
|
||||
return new ContextMenuResult
|
||||
@@ -147,7 +145,6 @@ namespace Microsoft.Plugin.Indexer
|
||||
}
|
||||
|
||||
// Function to add the context menu item to run as admin
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "We want to keep the process alive, and instead log the exception message")]
|
||||
private static ContextMenuResult CreateRunAsUserContextMenu(SearchResult record)
|
||||
{
|
||||
return new ContextMenuResult
|
||||
@@ -190,7 +187,6 @@ namespace Microsoft.Plugin.Indexer
|
||||
return false;
|
||||
}
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "We want to keep the process alive, and instead log and show an error message")]
|
||||
private ContextMenuResult CreateOpenContainingFolderResult(SearchResult record)
|
||||
{
|
||||
return new ContextMenuResult
|
||||
|
||||
@@ -71,7 +71,6 @@ namespace Microsoft.Plugin.Indexer
|
||||
}
|
||||
|
||||
// This function uses the Windows indexer and returns the list of results obtained
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "We want to keep the process alive but will log the exception")]
|
||||
public List<Result> Query(Query query, bool isFullQuery)
|
||||
{
|
||||
var results = new List<Result>();
|
||||
|
||||
Reference in New Issue
Block a user