mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Merge remote-tracking branch 'upstream/development' into development
This commit is contained in:
commit
15c7a62b5c
@ -149,7 +149,13 @@ namespace Artemis.Core.Services
|
|||||||
RemoveDevice(device);
|
RemoveDevice(device);
|
||||||
|
|
||||||
List<Exception> providerExceptions = new();
|
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.Exception += DeviceProviderOnException;
|
||||||
deviceProvider.Initialize();
|
deviceProvider.Initialize();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user