From 46431fb658701489f8d5de4475b02df728c51f36 Mon Sep 17 00:00:00 2001
From: chunxiaqiu <1057644574@qq.com>
Date: 星期三, 18 三月 2026 15:48:26 +0800
Subject: [PATCH] 新增:读码器功能模块,集成华睿读码器并初步实现读码功能

---
 LB_SmartVisionCommon/ConfigManager.cs |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/LB_SmartVisionCommon/ConfigManager.cs b/LB_SmartVisionCommon/ConfigManager.cs
index 9815212..84d88e0 100644
--- a/LB_SmartVisionCommon/ConfigManager.cs
+++ b/LB_SmartVisionCommon/ConfigManager.cs
@@ -21,6 +21,16 @@
         /// <param name="filePath">鏂囦欢瀛樺偍璺緞浠ュ強鍚嶇О</param>
         public static void SaveConfig<T>(T config, string filePath)
         {
+            if (config == null)
+            {
+                AsyncLogHelper.Error(nameof(config));
+                throw new ArgumentNullException(nameof(config));
+            }
+            if (filePath == null)
+            {
+                AsyncLogHelper.Error(nameof(filePath));
+                AsyncLogHelper.Error(nameof(filePath));
+            }
             var json = JsonConvert.SerializeObject(config, Newtonsoft.Json.Formatting.Indented);
             File.WriteAllText(filePath, json);
         }

--
Gitblit v1.9.3