0
0
mirror of https://github.com/sp-tarkov/patcher.git synced 2025-02-12 14:30:47 -05:00

add reactive UI logging of exceptions

This commit is contained in:
IsWaffle 2023-09-04 16:12:31 -04:00
parent 7a96f95a01
commit 16bf006964
5 changed files with 25 additions and 6 deletions

View File

@ -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>((exception) =>
{
PatchLogger.LogException(exception);
});
}
public override void OnFrameworkInitializationCompleted()

View File

@ -4,8 +4,8 @@
<TargetFramework>net6.0</TargetFramework>
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
<Nullable>enable</Nullable>
<AssemblyVersion>2.9.4</AssemblyVersion>
<FileVersion>2.9.4</FileVersion>
<AssemblyVersion>2.9.5</AssemblyVersion>
<FileVersion>2.9.5</FileVersion>
</PropertyGroup>
<ItemGroup>
<AvaloniaResource Include="Assets\**" />

View File

@ -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>((exception) =>
{
PatchLogger.LogException(exception);
});
}
public override void OnFrameworkInitializationCompleted()

View File

@ -4,8 +4,8 @@
<TargetFramework>net6.0</TargetFramework>
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
<Nullable>enable</Nullable>
<AssemblyVersion>2.9.4</AssemblyVersion>
<FileVersion>2.9.4</FileVersion>
<AssemblyVersion>2.9.5</AssemblyVersion>
<FileVersion>2.9.5</FileVersion>
</PropertyGroup>
<ItemGroup>

Binary file not shown.