Fix a clipboard crash issues & don't default exit Wox when exception happens.

This commit is contained in:
qianlifeng
2014-08-20 22:12:45 +08:00
parent 1d13943caf
commit a30f60c2ba
2 changed files with 14 additions and 10 deletions

View File

@@ -49,8 +49,16 @@ namespace Wox.Plugin.SystemPlugins
SubTitle = "Copy this number to the clipboard",
Action = (c) =>
{
Clipboard.SetText(result.Result);
return true;
try
{
Clipboard.SetText(result.Result);
return true;
}
catch (System.Runtime.InteropServices.ExternalException e)
{
MessageBox.Show("Copy failed, please try later");
return false;
}
}
} };
}