mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Add Sentry to catch exceptions.
This commit is contained in:
@@ -39,6 +39,7 @@ using Aaru.CommonTypes.Structs.Devices.SCSI;
|
||||
using Aaru.Decoders.SCSI;
|
||||
using Aaru.Decoders.SCSI.MMC;
|
||||
using Aaru.Helpers;
|
||||
using Sentry;
|
||||
using Inquiry = Aaru.CommonTypes.Structs.Devices.SCSI.Inquiry;
|
||||
|
||||
namespace Aaru.Devices;
|
||||
@@ -65,8 +66,10 @@ public partial class Device
|
||||
{
|
||||
aaruUri = new Uri(devicePath);
|
||||
}
|
||||
catch(Exception)
|
||||
catch(Exception ex)
|
||||
{
|
||||
SentrySdk.CaptureException(ex);
|
||||
|
||||
aaruUri = null;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Aaru.CommonTypes.Interop;
|
||||
using Aaru.Logging;
|
||||
using Sentry;
|
||||
|
||||
namespace Aaru.Devices;
|
||||
|
||||
@@ -132,8 +133,11 @@ public partial class Device
|
||||
|
||||
return remote.ListDevices();
|
||||
}
|
||||
catch(Exception)
|
||||
catch(Exception ex)
|
||||
{
|
||||
SentrySdk.CaptureException(ex);
|
||||
|
||||
AaruLogging.Exception(ex, Localization.Error_connecting_to_host);
|
||||
AaruLogging.Error(Localization.Error_connecting_to_host);
|
||||
|
||||
return [];
|
||||
|
||||
Reference in New Issue
Block a user