mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 18:57:19 +02:00
[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:
committed by
GitHub
parent
5065239266
commit
52a06b5cdc
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user