From 16bf0069646524a42c350fec422bfdcf852476fb Mon Sep 17 00:00:00 2001 From: "waffle.lord" Date: Mon, 4 Sep 2023 16:12:31 -0400 Subject: [PATCH] add reactive UI logging of exceptions --- Patcher/PatchClient/App.axaml.cs | 9 +++++++++ Patcher/PatchClient/PatchClient.csproj | 4 ++-- Patcher/PatchGenerator/App.axaml.cs | 10 ++++++++++ Patcher/PatchGenerator/PatchGenerator.csproj | 4 ++-- Patcher/PatchGenerator/Resources/PatchClient.exe | 4 ++-- 5 files changed, 25 insertions(+), 6 deletions(-) diff --git a/Patcher/PatchClient/App.axaml.cs b/Patcher/PatchClient/App.axaml.cs index fa637bb..94d8c2d 100644 --- a/Patcher/PatchClient/App.axaml.cs +++ b/Patcher/PatchClient/App.axaml.cs @@ -3,6 +3,10 @@ using Avalonia.Controls.ApplicationLifetimes; using Avalonia.Markup.Xaml; using PatchClient.ViewModels; using PatchClient.Views; +using ReactiveUI; +using System.Reactive; +using System; +using PatcherUtils.Model; namespace PatchClient { @@ -11,6 +15,11 @@ namespace PatchClient public override void Initialize() { AvaloniaXamlLoader.Load(this); + + RxApp.DefaultExceptionHandler = Observer.Create((exception) => + { + PatchLogger.LogException(exception); + }); } public override void OnFrameworkInitializationCompleted() diff --git a/Patcher/PatchClient/PatchClient.csproj b/Patcher/PatchClient/PatchClient.csproj index 99a4935..8b1479f 100644 --- a/Patcher/PatchClient/PatchClient.csproj +++ b/Patcher/PatchClient/PatchClient.csproj @@ -4,8 +4,8 @@ net6.0 true enable - 2.9.4 - 2.9.4 + 2.9.5 + 2.9.5 diff --git a/Patcher/PatchGenerator/App.axaml.cs b/Patcher/PatchGenerator/App.axaml.cs index 88b1ceb..0e0c1c6 100644 --- a/Patcher/PatchGenerator/App.axaml.cs +++ b/Patcher/PatchGenerator/App.axaml.cs @@ -4,6 +4,10 @@ using Avalonia.Markup.Xaml; using PatchGenerator.Models; using PatchGenerator.ViewModels; using PatchGenerator.Views; +using ReactiveUI; +using System.Reactive; +using System; +using PatcherUtils.Model; namespace PatchGenerator { @@ -12,6 +16,12 @@ namespace PatchGenerator public override void Initialize() { AvaloniaXamlLoader.Load(this); + + RxApp.DefaultExceptionHandler = Observer.Create((exception) => + { + PatchLogger.LogException(exception); + }); + } public override void OnFrameworkInitializationCompleted() diff --git a/Patcher/PatchGenerator/PatchGenerator.csproj b/Patcher/PatchGenerator/PatchGenerator.csproj index c1c918f..24e1321 100644 --- a/Patcher/PatchGenerator/PatchGenerator.csproj +++ b/Patcher/PatchGenerator/PatchGenerator.csproj @@ -4,8 +4,8 @@ net6.0 true enable - 2.9.4 - 2.9.4 + 2.9.5 + 2.9.5 diff --git a/Patcher/PatchGenerator/Resources/PatchClient.exe b/Patcher/PatchGenerator/Resources/PatchClient.exe index 06b66d1..d44b4bb 100644 --- a/Patcher/PatchGenerator/Resources/PatchClient.exe +++ b/Patcher/PatchGenerator/Resources/PatchClient.exe @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4010166d21d2fc4ecbe9abe1bdae048d09612e11dcc254842274454a301ee931 -size 102614473 +oid sha256:f56b97b15e16143263ac7b30c8ca2f58267993cd9e5387f5910502fdc5af98bb +size 101460425