mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
RGB Service - Update for RGB.NET exception changes
This commit is contained in:
parent
031470c331
commit
52d0efb90e
@ -149,7 +149,13 @@ namespace Artemis.Core.Services
|
||||
RemoveDevice(device);
|
||||
|
||||
List<Exception> providerExceptions = new();
|
||||
void DeviceProviderOnException(object? sender, Exception e) => providerExceptions.Add(e);
|
||||
void DeviceProviderOnException(object? sender, ExceptionEventArgs e)
|
||||
{
|
||||
if (e.IsCritical)
|
||||
providerExceptions.Add(e.Exception);
|
||||
else
|
||||
_logger.Warning(e.Exception, "Device provider {deviceProvider} threw non-critical exception", deviceProvider.GetType().Name);
|
||||
}
|
||||
|
||||
deviceProvider.Exception += DeviceProviderOnException;
|
||||
deviceProvider.Initialize();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user