From d3de136dd3cc02d09d218e75e07beaea401b20e0 Mon Sep 17 00:00:00 2001 From: Serge <5920850+seerge@users.noreply.github.com> Date: Sat, 17 Jun 2023 12:32:58 +0200 Subject: [PATCH] Exception handling --- app/Settings.cs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/app/Settings.cs b/app/Settings.cs index f769ce34..f2395e00 100644 --- a/app/Settings.cs +++ b/app/Settings.cs @@ -1146,14 +1146,20 @@ namespace GHelper int cpuUV = AppConfig.GetMode("cpu_uv", 0); int igpuUV = AppConfig.GetMode("igpu_uv", 0); - if (cpuUV >= -40 && cpuUV <= 0) + try { - SendCommand.set_coall(cpuUV); - } + if (cpuUV >= -40 && cpuUV <= 0) + { + SendCommand.set_coall(cpuUV); + } - if (igpuUV >= -40 && igpuUV <= 0) + if (igpuUV >= -40 && igpuUV <= 0) + { + SendCommand.set_cogfx(igpuUV); + } + } catch (Exception ex) { - SendCommand.set_cogfx(igpuUV); + Logger.WriteLine("UV Error: " + ex.ToString()); } }