[PT Run] Mitigate JSON Deserialization exception (#6295)

* Add error reporting window on deserialisation error

* Add message box to show launcher errors

* Change report window to messagebox

* nit fix in error window

* Localized string for error window

* update messagebox interface

* Correct ShowMessageBox argument order
This commit is contained in:
Divyansh Srivastava
2020-09-08 10:04:17 -07:00
committed by GitHub
parent 5065239266
commit 52a06b5cdc
6 changed files with 79 additions and 10 deletions

View File

@@ -3,6 +3,9 @@
// See the LICENSE file in the project root for more information.
using System;
using System.Diagnostics;
using System.Globalization;
using System.Windows;
using System.Windows.Threading;
using NLog;
using Wox.Infrastructure;
@@ -32,6 +35,14 @@ namespace PowerLauncher.Helper
}
}
public static void ShowMessageBox(string title, string message)
{
Application.Current.Dispatcher.Invoke(() =>
{
MessageBox.Show(message, title);
});
}
public static void UnhandledExceptionHandle(object sender, UnhandledExceptionEventArgs e)
{
// handle non-ui thread exceptions