annotate `secondarySources` with `{.raises.}` (#5012)
`sources.addConfigFile` may raise `ConfigurationError`, annotate caller to propagate that error explicitly.
This commit is contained in:
parent
73b3f40e8d
commit
6cd63a89d8
|
@ -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)
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue