[PTRun]Improve copying error handling on plugins (#35459)

This commit is contained in:
PesBandi
2024-10-21 14:42:11 +02:00
committed by GitHub
parent 5d2bb16e92
commit db3c8e621e
6 changed files with 27 additions and 9 deletions

View File

@@ -8,6 +8,7 @@ using System.Threading;
using System.Windows;
using Wox.Plugin;
using Wox.Plugin.Logger;
namespace Microsoft.PowerToys.Run.Plugin.Calculator
{
@@ -51,9 +52,10 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator
Clipboard.SetText(roundedResult?.ToString(culture));
ret = true;
}
catch (ExternalException)
catch (ExternalException ex)
{
MessageBox.Show(Properties.Resources.wox_plugin_calculator_copy_failed);
Log.Exception("Copy failed", ex, typeof(ResultHelper));
MessageBox.Show(ex.Message, Properties.Resources.wox_plugin_calculator_copy_failed);
}
});