We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 375b627 commit 585059dCopy full SHA for 585059d
confutils.nim
@@ -820,8 +820,14 @@ macro configurationRtti(RecordType: type): untyped =
820
proc addConfigFile*(secondarySources: auto,
821
Format: type,
822
path: InputFile) =
823
- secondarySources.data.add loadFile(Format, string path,
824
- type(secondarySources.data[0]))
+ try:
+ secondarySources.data.add loadFile(Format, string path,
825
+ type(secondarySources.data[0]))
826
+ except SerializationError as err:
827
+ raise newException(ConfigurationError, err.formatMsg(string path), err)
828
+ except IOError as err:
829
+ raise newException(ConfigurationError,
830
+ "Failed to read config file at '" & string(path) & "': " & err.msg)
831
832
proc loadImpl[C, SecondarySources](
833
Configuration: typedesc[C],
0 commit comments