From ca7b2a620aed0938f1854e1d5f7bb0aaf63a2e18 Mon Sep 17 00:00:00 2001 From: Jonathan Bernard Date: Wed, 19 Nov 2025 08:19:56 -0600 Subject: [PATCH] CombinedConfig should give more details when failing to parse a JSON value. --- cliutils/config.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cliutils/config.nim b/cliutils/config.nim index fe25b09..0c0a660 100644 --- a/cliutils/config.nim +++ b/cliutils/config.nim @@ -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,