mirror of
https://github.com/status-im/nim-confutils.git
synced 2025-03-03 05:10:33 +00:00
catch exceptions in appInvocation
(#78)
The `appInvocation` template in `confutils` is used while showing help, e.g., before quitting. To ensure that `quit` actually happens, it can't raise exceptions. Fix that by falling back to `""` on `OSError`.
This commit is contained in:
parent
50f744d821
commit
6c3566850d
@ -96,7 +96,10 @@ when defined(nimscript):
|
||||
|
||||
else:
|
||||
template appInvocation: string =
|
||||
getAppFilename().splitFile.name
|
||||
try:
|
||||
getAppFilename().splitFile.name
|
||||
except OSError:
|
||||
""
|
||||
|
||||
when noColors:
|
||||
const
|
||||
|
Loading…
x
Reference in New Issue
Block a user