mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-02-23 19:49:43 +01:00
Fix comments
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Threading.Tasks;
|
||||
using ManagedCommon;
|
||||
@@ -48,7 +49,14 @@ internal sealed partial class AppCommand : InvokableCommand
|
||||
// const ActivateOptions noFlags = ActivateOptions.None;
|
||||
await Task.Run(() =>
|
||||
{
|
||||
Process.Start(new ProcessStartInfo(path) { UseShellExecute = true });
|
||||
try
|
||||
{
|
||||
Process.Start(new ProcessStartInfo(path) { UseShellExecute = true });
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
Logger.LogError(ex.Message);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using ManagedCommon;
|
||||
using Microsoft.CommandPalette.Extensions;
|
||||
using Microsoft.CommandPalette.Extensions.Toolkit;
|
||||
using Windows.Storage.Streams;
|
||||
|
||||
@@ -52,7 +52,6 @@ public class PackageWrapper : IPackage
|
||||
}
|
||||
catch (Exception e) when (e is ArgumentException || e is FileNotFoundException || e is DirectoryNotFoundException)
|
||||
{
|
||||
Logger.LogError(e.Message);
|
||||
return new PackageWrapper(
|
||||
package.Id.Name,
|
||||
package.Id.FullName,
|
||||
|
||||
@@ -201,14 +201,12 @@ internal static class RegistryHelper
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
Logger.LogError(exception.Message);
|
||||
list.Add(new RegistryEntry($"{parentKey.Name}\\{subKey}", exception));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.LogError(ex.Message);
|
||||
list.Add(new RegistryEntry(parentKey.Name, ex));
|
||||
}
|
||||
|
||||
|
||||
@@ -141,7 +141,6 @@ internal static class ResultHelper
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
Logger.LogError(exception.Message);
|
||||
var registryEntry = new RegistryEntry(key.Name, exception);
|
||||
|
||||
resultList.Add(new ListItem(new OpenKeyInEditorCommand(registryEntry))
|
||||
|
||||
@@ -112,9 +112,9 @@ internal static class AvailableResultsList
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.LogError($"Unable to format date time with format: {value}. Error: {ex.Message}");
|
||||
if (!containsCustomSyntax)
|
||||
{
|
||||
Logger.LogError($"Unable to format date time with format: {value}. Error: {ex.Message}");
|
||||
throw;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user