Remove some useless code for error reporting

This commit is contained in:
bao-qian
2017-04-01 12:49:02 +01:00
parent cc6c18b5ad
commit bf4c4561ce
5 changed files with 23 additions and 45 deletions

View File

@@ -6,6 +6,7 @@ using System.Text;
using System.Linq;
using System.Windows;
using System.Windows.Documents;
using Wox.Helper;
using Wox.Infrastructure;
using Wox.Infrastructure.Logger;
@@ -26,18 +27,13 @@ namespace Wox
var directory = new DirectoryInfo(path);
var log = directory.GetFiles().OrderByDescending(f => f.LastWriteTime).First();
var paragraph = Hyperlink("Please open new issue in: " , Constant.Issue);
var paragraph = Hyperlink("Please open new issue in: ", Constant.Issue);
paragraph.Inlines.Add($"1. upload log file: {log.FullName}\n");
paragraph.Inlines.Add($"2. copy below exception message");
ErrorTextbox.Document.Blocks.Add(paragraph);
StringBuilder content = new StringBuilder();
content.AppendLine($"Wox version: {Constant.Version}");
content.AppendLine($"OS Version: {Environment.OSVersion.VersionString}");
content.AppendLine($"IntPtr Length: {IntPtr.Size}");
content.AppendLine($"x64: {Environment.Is64BitOperatingSystem}");
content.AppendLine($"Python Path: {Constant.PythonPath}");
content.AppendLine($"Everything SDK Path: {Constant.EverythingSDKPath}");
content.AppendLine(ErrorReporting.RuntimeInfo());
content.AppendLine($"Date: {DateTime.Now.ToString(CultureInfo.InvariantCulture)}");
content.AppendLine("Exception:");
content.AppendLine(exception.Source);
@@ -54,7 +50,7 @@ namespace Wox
var paragraph = new Paragraph();
paragraph.Margin = new Thickness(0);
var link = new Hyperlink {IsEnabled = true};
var link = new Hyperlink { IsEnabled = true };
link.Inlines.Add(url);
link.NavigateUri = new Uri(url);
link.RequestNavigate += (s, e) => Process.Start(e.Uri.ToString());