mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 20:27:36 +02:00
Better crash report
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
@@ -32,9 +33,7 @@ namespace Wox
|
|||||||
Stopwatch.Debug("Startup Time", () =>
|
Stopwatch.Debug("Startup Time", () =>
|
||||||
{
|
{
|
||||||
base.OnStartup(e);
|
base.OnStartup(e);
|
||||||
DispatcherUnhandledException += ErrorReporting.DispatcherUnhandledException;
|
RegisterUnhandledException();
|
||||||
AppDomain.CurrentDomain.UnhandledException += ErrorReporting.UnhandledExceptionHandle;
|
|
||||||
|
|
||||||
ThreadPool.QueueUserWorkItem(o => { ImageLoader.ImageLoader.PreloadImages(); });
|
ThreadPool.QueueUserWorkItem(o => { ImageLoader.ImageLoader.PreloadImages(); });
|
||||||
Window = new MainWindow();
|
Window = new MainWindow();
|
||||||
PluginManager.Init(Window);
|
PluginManager.Init(Window);
|
||||||
@@ -43,6 +42,14 @@ namespace Wox
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Conditional("DEBUG")]
|
||||||
|
private void RegisterUnhandledException()
|
||||||
|
{
|
||||||
|
// let exception throw as normal is better for Debug
|
||||||
|
DispatcherUnhandledException += ErrorReporting.DispatcherUnhandledException;
|
||||||
|
AppDomain.CurrentDomain.UnhandledException += ErrorReporting.UnhandledExceptionHandle;
|
||||||
|
}
|
||||||
|
|
||||||
public bool OnActivate(IList<string> args)
|
public bool OnActivate(IList<string> args)
|
||||||
{
|
{
|
||||||
CommandArgsFactory.Execute(args);
|
CommandArgsFactory.Execute(args);
|
||||||
|
|||||||
Reference in New Issue
Block a user