CombinedConfig should give more details when failing to parse a JSON value.

This commit is contained in:
2025-11-19 08:19:56 -06:00
parent f2c729fd7d
commit ca7b2a620a

View File

@@ -95,7 +95,7 @@ proc getJson*(
elif cfg.json.hasKey(jsonKey): return cfg.json[jsonKey]
else: raise newException(ValueError, "cannot find a configuration value for \"" & key & "\"")
except Exception:
raise newException(ValueError, "cannot parse value as JSON:" & getCurrentExceptionMsg())
raise newException(ValueError, "cannot parse [" & getVal(cfg, key) & "] as JSON:" & getCurrentExceptionMsg())
proc getJson*(
cfg: CombinedConfig,