-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathErrorReport.cs
31 lines (29 loc) · 990 Bytes
/
ErrorReport.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace MouseSwitcher
{
public partial class ErrorReport : Form
{
public static void ReportError(Exception err)
{
var window = new ErrorReport();
window.texts.AppendText("程序遇到了错误。向开发者提供下面的信息有助于诊断和修复这个错误。\n");
window.texts.AppendText("这些信息仅与程序代码相关,通常不会包含关于您或您计算机的信息。\n");
window.texts.AppendText("------------------------\n");
window.texts.AppendText(err.Message + "\n");
window.texts.AppendText(err.StackTrace);
window.ShowDialog();
}
public ErrorReport()
{
InitializeComponent();
}
}
}