From 6cd63a89d8364003edd37f16c15606e980b417ab Mon Sep 17 00:00:00 2001 From: Etan Kissling Date: Wed, 31 May 2023 21:28:33 +0200 Subject: [PATCH] annotate `secondarySources` with `{.raises.}` (#5012) `sources.addConfigFile` may raise `ConfigurationError`, annotate caller to propagate that error explicitly. --- beacon_chain/nimbus_binary_common.nim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/beacon_chain/nimbus_binary_common.nim b/beacon_chain/nimbus_binary_common.nim index 4e111cf2c..15a6f8429 100644 --- a/beacon_chain/nimbus_binary_common.nim +++ b/beacon_chain/nimbus_binary_common.nim @@ -200,7 +200,9 @@ template makeBannerAndConfig*(clientId: string, ConfType: type): untyped = ConfType.load( version = version, # but a short version string makes more sense... copyrightBanner = clientId, - secondarySources = proc (config: ConfType, sources: auto) = + secondarySources = proc ( + config: ConfType, sources: auto + ) {.raises: [ConfigurationError].} = if config.configFile.isSome: sources.addConfigFile(Toml, config.configFile.get) )