Add Sentry to catch exceptions.

This commit is contained in:
2025-08-20 18:51:05 +01:00
parent d5ef2c874d
commit c1f4b92548
70 changed files with 1213 additions and 1087 deletions

View File

@@ -47,6 +47,7 @@ using Aaru.Settings;
using Avalonia.Threading;
using Microsoft.EntityFrameworkCore;
using ReactiveUI;
using Sentry;
namespace Aaru.Gui.ViewModels.Windows;
@@ -134,9 +135,10 @@ public sealed class SplashWindowViewModel(SplashWindow view) : ViewModelBase
ctx?.Database.CloseConnection();
ctx?.Dispose();
}
catch(Exception)
catch(Exception ex)
{
// Should not ever arrive here, but if it does, keep trying to replace it anyway
SentrySdk.CaptureException(ex);
}
File.Delete(Settings.Settings.LocalDbPath);
@@ -212,12 +214,14 @@ public sealed class SplashWindowViewModel(SplashWindow view) : ViewModelBase
{
File.Delete(Settings.Settings.MainDbPath);
}
catch(Exception)
catch(Exception ex)
{
AaruLogging.Error(UI.Exception_trying_to_remove_old_database_version);
AaruLogging.Error(UI.Please_manually_remove_file_at_0, Settings.Settings.MainDbPath);
SentrySdk.CaptureException(ex);
return;
}