[smuxi/stable] Engine: log null values in UserConfig.set_Item[]
- From: Mirco M. M. Bauer <mmmbauer src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [smuxi/stable] Engine: log null values in UserConfig.set_Item[]
- Date: Tue, 8 Jun 2021 14:21:35 +0000 (UTC)
commit 929a2925d4b2c7c4abffc47f5f083d2b6d7b079a
Author: Mirco Bauer <meebey meebey net>
Date: Tue Jun 8 20:24:59 2021 +0800
Engine: log null values in UserConfig.set_Item[]
The Set() method will throw an ArgumentNullException for null values. To aid
debugging for issues in the config system, the config key is now logged.
src/Engine/Config/UserConfig.cs | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/src/Engine/Config/UserConfig.cs b/src/Engine/Config/UserConfig.cs
index 5f71a07e..d1261bdd 100644
--- a/src/Engine/Config/UserConfig.cs
+++ b/src/Engine/Config/UserConfig.cs
@@ -98,6 +98,11 @@ namespace Smuxi.Engine
return obj;
}
set {
+#if LOG4NET
+ if (value == null) {
+ _Logger.Error($"set_Item[{key}]: value is null");
+ }
+#endif
Set(key, value);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]