status-im / nim-confutils

Simplified handling of command line options and config files
Apache License 2.0
63 stars 16 forks source link

catch exceptions in `splitCompletionLine` #77

Closed etan-status closed 1 year ago

etan-status commented 1 year ago

We currently return @[] in splitCompletionLine when there is unexpected or unsupported input via environment variables, but let exceptions during parsing propagate to the caller. Catching those exceptions allows the caller to use same behaviour regardless of the nature of unexpected input (either through env, or parsing). Currently, callers don't seem to be aware of the exceptions, so going with the behaviour used for environment errors of returning @[].