Added exception-handling to all UpdateQueues

This commit is contained in:
DarthAffe committed 2023-03-05 16:34:01 +01:00
1 parent 6e313ea6a1
commit 37e4954583
18 files changed
+222 -97

No files matched your search

@@ -51,10 +51,17 @@ public class OpenRGBUpdateQueue : UpdateQueue
/// <inheritdoc />
protected override void Update(in ReadOnlySpan<(object key, Color color)> dataSet)
{
foreach ((object key, Color color) in dataSet)
_colors[(int)key] = new OpenRGBColor(color.GetR(), color.GetG(), color.GetB());
try
{
foreach ((object key, Color color) in dataSet)
_colors[(int)key] = new OpenRGBColor(color.GetR(), color.GetG(), color.GetB());
_openRGB.UpdateLeds(_deviceid, _colors);
_openRGB.UpdateLeds(_deviceid, _colors);
}
catch (Exception ex)
{
OpenRGBDeviceProvider.Instance.Throw(ex, true);
}
}
#endregion