Add error report (however it has no sending feature at this commit)

This commit is contained in:
Yeechan Lu
2014-03-27 12:58:36 +08:00
parent 2ec71c9942
commit 9bc4b74888
6 changed files with 364 additions and 19 deletions

View File

@@ -56,7 +56,6 @@ namespace Wox
this.AllowsTransparency = true;
System.Net.WebRequest.RegisterPrefix("data", new DataWebRequestFactory());
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
progressBar.ToolTip = toolTip;
InitialTray();
@@ -104,24 +103,6 @@ namespace Wox
WindowIntelopHelper.DisableControlBox(this);
}
private void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
if (!System.Diagnostics.Debugger.IsAttached)
{
string error = "Wox has an error that can't be handled. " + e.ExceptionObject;
if (e.IsTerminating)
{
notifyIcon.Visible = false;
MessageBox.Show(error);
Log.Fatal(error);
}
else
{
Log.Error(error);
}
}
}
public void SetHotkey(string hotkeyStr, EventHandler<HotkeyEventArgs> action)
{
var hotkey = new HotkeyModel(hotkeyStr);