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

@@ -30,10 +30,12 @@
// Copyright © 2011-2025 Natalia Portillo
// ****************************************************************************/
using System;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using Aaru.Helpers;
using Aaru.Logging;
using Sentry;
namespace Aaru.Core;
@@ -150,8 +152,10 @@ public sealed class DataFile
outputFs.Write(data, 0, data.Length);
outputFs.Close();
}
catch
catch(Exception ex)
{
SentrySdk.CaptureException(ex);
AaruLogging.Exception(ex, Localization.Core.Unable_to_write_file_0, filename);
AaruLogging.Error(Localization.Core.Unable_to_write_file_0, filename);
}
}